home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 1.0 / CIncludes / QuickTimeComponents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  79.5 KB  |  2,040 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        QuickTimeComponents.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __QUICKTIMECOMPONENTS__
  13. #define __QUICKTIMECOMPONENTS__
  14.  
  15. #ifndef __COMPONENTS__
  16. #include <Components.h>
  17. /*    #include <Types.h>                                            */
  18. /*        #include <ConditionalMacros.h>                            */
  19. /*        #include <MixedMode.h>                                    */
  20. /*            #include <Traps.h>                                    */
  21. #endif
  22.  
  23. #ifndef __IMAGECOMPRESSION__
  24. #include <ImageCompression.h>
  25. /*    #include <Quickdraw.h>                                        */
  26. /*        #include <QuickdrawText.h>                                */
  27. /*            #include <IntlResources.h>                            */
  28. /*    #include <QDOffscreen.h>                                    */
  29. /*    #include <StandardFile.h>                                    */
  30. /*        #include <Dialogs.h>                                    */
  31. /*            #include <Windows.h>                                */
  32. /*                #include <Events.h>                                */
  33. /*                    #include <OSUtils.h>                        */
  34. /*                #include <Controls.h>                            */
  35. /*                    #include <Menus.h>                            */
  36. /*            #include <TextEdit.h>                                */
  37. /*        #include <Files.h>                                        */
  38. /*            #include <SegLoad.h>                                */
  39. #endif
  40.  
  41. #ifndef __MOVIES__
  42. #include <Movies.h>
  43. /*    #include <Aliases.h>                                        */
  44. /*        #include <AppleTalk.h>                                    */
  45. /*    #include <ToolUtils.h>                                        */
  46. /*        #include <TextUtils.h>                                    */
  47. /*            #include <Script.h>                                    */
  48. /*        #include <FixMath.h>                                    */
  49. #endif
  50.  
  51. #ifndef __QUICKDRAW__
  52. #endif
  53.  
  54. #ifndef __VIDEO__
  55. #include <Video.h>
  56. #endif
  57.  
  58. #define clockComponentType 'clok'
  59.  
  60. #define systemTickClock 'tick'
  61.  
  62. #define systemSecondClock 'seco'
  63.  
  64. #define systemMillisecondClock 'mill'
  65.  
  66. #define systemMicrosecondClock 'micr'
  67.  
  68. enum  {
  69.     kClockRateIsLinear            = 1,
  70.     kClockImplementsCallBacks    = 2
  71. };
  72.  
  73. #define ClockGetTime GetClockTime
  74.  
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78.  
  79. extern pascal ComponentResult GetClockTime(ComponentInstance aClock, TimeRecord *out)
  80.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1, 0x7000, 0xA82A);
  81. extern pascal QTCallBack ClockNewCallBack(ComponentInstance aClock, TimeBase tb, short callBackType)
  82.  FIVEWORDINLINE(0x2F3C, 0x6, 0x2, 0x7000, 0xA82A);
  83. extern pascal ComponentResult ClockDisposeCallBack(ComponentInstance aClock, QTCallBack cb)
  84.  FIVEWORDINLINE(0x2F3C, 0x4, 0x3, 0x7000, 0xA82A);
  85. extern pascal ComponentResult ClockCallMeWhen(ComponentInstance aClock, QTCallBack cb, long param1, long param2, long param3)
  86.  FIVEWORDINLINE(0x2F3C, 0x10, 0x4, 0x7000, 0xA82A);
  87. extern pascal ComponentResult ClockCancelCallBack(ComponentInstance aClock, QTCallBack cb)
  88.  FIVEWORDINLINE(0x2F3C, 0x4, 0x5, 0x7000, 0xA82A);
  89. extern pascal ComponentResult ClockRateChanged(ComponentInstance aClock, QTCallBack cb)
  90.  FIVEWORDINLINE(0x2F3C, 0x4, 0x6, 0x7000, 0xA82A);
  91. extern pascal ComponentResult ClockTimeChanged(ComponentInstance aClock, QTCallBack cb)
  92.  FIVEWORDINLINE(0x2F3C, 0x4, 0x7, 0x7000, 0xA82A);
  93. extern pascal ComponentResult ClockSetTimeBase(ComponentInstance aClock, TimeBase tb)
  94.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8, 0x7000, 0xA82A);
  95. extern pascal ComponentResult ClockStartStopChanged(ComponentInstance aClock, QTCallBack cb, Boolean startChanged, Boolean stopChanged)
  96.  FIVEWORDINLINE(0x2F3C, 0x8, 0x9, 0x7000, 0xA82A);
  97. extern pascal ComponentResult ClockGetRate(ComponentInstance aClock, Fixed *rate)
  98.  FIVEWORDINLINE(0x2F3C, 0x4, 0xA, 0x7000, 0xA82A);
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102.  
  103. enum  {
  104.     kClockGetTimeSelect            = 0x1,
  105.     kClockNewCallBackSelect        = 0x2,
  106.     kClockDisposeCallBackSelect    = 0x3,
  107.     kClockCallMeWhenSelect        = 0x4,
  108.     kClockCancelCallBackSelect    = 0x5,
  109.     kClockRateChangedSelect        = 0x6,
  110.     kClockTimeChangedSelect        = 0x7,
  111.     kClockSetTimeBaseSelect        = 0x8,
  112.     kClockStartStopChangedSelect = 0x9,
  113.     kClockGetRateSelect            = 0xA
  114. };
  115.  
  116. typedef ComponentInstance SeqGrabComponent;
  117.  
  118. typedef ComponentInstance SGChannel;
  119.  
  120. #define SeqGrabComponentType 'barg'
  121.  
  122. #define SeqGrabChannelType 'sgch'
  123.  
  124. #define SeqGrabPanelType 'sgpn'
  125.  
  126. #define SeqGrabCompressionPanelType 'comp'
  127.  
  128. #define SeqGrabSourcePanelType 'sour'
  129.  
  130. enum  {
  131.     seqGrabToDisk                = 1,
  132.     seqGrabToMemory                = 2,
  133.     seqGrabDontUseTempMemory    = 4,
  134.     seqGrabAppendToFile            = 8,
  135.     seqGrabDontAddMovieResource    = 16,
  136.     seqGrabDontMakeMovie        = 32,
  137.     seqGrabPreExtendFile        = 64
  138. };
  139.  
  140. typedef unsigned long SeqGrabDataOutputEnum;
  141.  
  142. enum  {
  143.     seqGrabRecord                = 1,
  144.     seqGrabPreview                = 2,
  145.     seqGrabPlayDuringRecord        = 4
  146. };
  147.  
  148. typedef unsigned long SeqGrabUsageEnum;
  149.  
  150. enum  {
  151.     seqGrabHasBounds            = 1,
  152.     seqGrabHasVolume            = 2,
  153.     seqGrabHasDiscreteSamples    = 4
  154. };
  155.  
  156. typedef unsigned long SeqGrabChannelInfoEnum;
  157.  
  158. #if defined(powerc) || defined (__powerc)
  159. #pragma options align=mac68k
  160. #endif
  161. struct seqGrabFrameInfo {
  162.     long                        frameOffset;
  163.     long                        frameTime;
  164.     long                        frameSize;
  165.     SGChannel                    frameChannel;
  166.     long                        frameRefCon;
  167. };
  168. #if defined(powerc) || defined(__powerc)
  169. #pragma options align=reset
  170. #endif
  171.  
  172. typedef struct seqGrabFrameInfo seqGrabFrameInfo;
  173.  
  174. enum  {
  175.     grabPictOffScreen            = 1,
  176.     grabPictIgnoreClip            = 2,
  177.     grabPictCurrentImage        = 4
  178. };
  179.  
  180. #define sgFlagControlledGrab (1)
  181.  
  182. typedef pascal OSErr (*SGDataProcPtr)(SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType, long refCon);
  183.  
  184. enum {
  185.     uppSGDataProcInfo = kPascalStackBased
  186.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  187.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  188.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  189.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  190.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long*)))
  191.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  192.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(TimeValue)))
  193.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(short)))
  194.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(long)))
  195. };
  196.  
  197. #if USESROUTINEDESCRIPTORS
  198. typedef UniversalProcPtr SGDataUPP;
  199.  
  200. #define CallSGDataProc(userRoutine, c, p, len, offset, chRefCon, time, writeType, refCon)        \
  201.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGDataProcInfo, (c), (p), (len), (offset), (chRefCon), (time), (writeType), (refCon))
  202. #define NewSGDataProc(userRoutine)        \
  203.         (SGDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDataProcInfo, GetCurrentISA())
  204. #else
  205. typedef SGDataProcPtr SGDataUPP;
  206.  
  207. #define CallSGDataProc(userRoutine, c, p, len, offset, chRefCon, time, writeType, refCon)        \
  208.         (*(userRoutine))((c), (p), (len), (offset), (chRefCon), (time), (writeType), (refCon))
  209. #define NewSGDataProc(userRoutine)        \
  210.         (SGDataUPP)(userRoutine)
  211. #endif
  212.  
  213. #if defined(powerc) || defined (__powerc)
  214. #pragma options align=mac68k
  215. #endif
  216. struct SGDeviceName {
  217.     Str63                        name;
  218.     Handle                        icon;
  219.     long                        flags;
  220.     long                        refCon;
  221.     long                        reserved;
  222. };
  223. #if defined(powerc) || defined(__powerc)
  224. #pragma options align=reset
  225. #endif
  226.  
  227. typedef struct SGDeviceName SGDeviceName;
  228.  
  229. #define sgDeviceNameFlagDeviceUnavailable (1)
  230.  
  231. #if defined(powerc) || defined (__powerc)
  232. #pragma options align=mac68k
  233. #endif
  234. struct SGDeviceListRecord {
  235.     short                        count;
  236.     short                        selectedIndex;
  237.     long                        reserved;
  238.     SGDeviceName                entry[1];
  239. };
  240. #if defined(powerc) || defined(__powerc)
  241. #pragma options align=reset
  242. #endif
  243.  
  244. typedef struct SGDeviceListRecord SGDeviceListRecord;
  245.  
  246. typedef SGDeviceListRecord *SGDeviceListPtr, **SGDeviceList;
  247.  
  248. #define sgDeviceListWithIcons (1)
  249.  
  250. #define sgDeviceListDontCheckAvailability (2)
  251.  
  252. enum  {
  253.     seqGrabWriteAppend,
  254.     seqGrabWriteReserve,
  255.     seqGrabWriteFill
  256. };
  257.  
  258. enum  {
  259.     seqGrabUnpause                = 0,
  260.     seqGrabPause                = 1,
  261.     seqGrabPauseForMenu            = 3
  262. };
  263.  
  264. enum  {
  265.     channelFlagDontOpenResFile    = 2,
  266.     channelFlagHasDependency    = 4
  267. };
  268.  
  269. typedef pascal Boolean (*SGModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit, long refCon);
  270.  
  271. enum {
  272.     uppSGModalFilterProcInfo = kPascalStackBased
  273.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  274.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
  275.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
  276.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*)))
  277.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  278. };
  279.  
  280. #if USESROUTINEDESCRIPTORS
  281. typedef UniversalProcPtr SGModalFilterUPP;
  282.  
  283. #define CallSGModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refCon)        \
  284.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGModalFilterProcInfo, (theDialog), (theEvent), (itemHit), (refCon))
  285. #define NewSGModalFilterProc(userRoutine)        \
  286.         (SGModalFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGModalFilterProcInfo, GetCurrentISA())
  287. #else
  288. typedef SGModalFilterProcPtr SGModalFilterUPP;
  289.  
  290. #define CallSGModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refCon)        \
  291.         (*(userRoutine))((theDialog), (theEvent), (itemHit), (refCon))
  292. #define NewSGModalFilterProc(userRoutine)        \
  293.         (SGModalFilterUPP)(userRoutine)
  294. #endif
  295.  
  296. enum  {
  297.     sgPanelFlagForPanel            = 1
  298. };
  299.  
  300. #define channelPlayNormal 0
  301.  
  302. #define channelPlayFast 1
  303.  
  304. #define channelPlayHighQuality 2
  305.  
  306. #define channelPlayAllData 4
  307.  
  308. #ifdef __cplusplus
  309. extern "C" {
  310. #endif
  311.  
  312. extern pascal ComponentResult SGInitialize(SeqGrabComponent s)
  313.  FIVEWORDINLINE(0x2F3C, 0, 0x1, 0x7000, 0xA82A);
  314. extern pascal ComponentResult SGSetDataOutput(SeqGrabComponent s, FSSpec *movieFile, long whereFlags)
  315.  FIVEWORDINLINE(0x2F3C, 0x8, 0x2, 0x7000, 0xA82A);
  316. extern pascal ComponentResult SGGetDataOutput(SeqGrabComponent s, FSSpec *movieFile, long *whereFlags)
  317.  FIVEWORDINLINE(0x2F3C, 0x8, 0x3, 0x7000, 0xA82A);
  318. extern pascal ComponentResult SGSetGWorld(SeqGrabComponent s, CGrafPtr gp, GDHandle gd)
  319.  FIVEWORDINLINE(0x2F3C, 0x8, 0x4, 0x7000, 0xA82A);
  320. extern pascal ComponentResult SGGetGWorld(SeqGrabComponent s, CGrafPtr *gp, GDHandle *gd)
  321.  FIVEWORDINLINE(0x2F3C, 0x8, 0x5, 0x7000, 0xA82A);
  322. extern pascal ComponentResult SGNewChannel(SeqGrabComponent s, OSType channelType, SGChannel *ref)
  323.  FIVEWORDINLINE(0x2F3C, 0x8, 0x6, 0x7000, 0xA82A);
  324. extern pascal ComponentResult SGDisposeChannel(SeqGrabComponent s, SGChannel c)
  325.  FIVEWORDINLINE(0x2F3C, 0x4, 0x7, 0x7000, 0xA82A);
  326. extern pascal ComponentResult SGStartPreview(SeqGrabComponent s)
  327.  FIVEWORDINLINE(0x2F3C, 0, 0x10, 0x7000, 0xA82A);
  328. extern pascal ComponentResult SGStartRecord(SeqGrabComponent s)
  329.  FIVEWORDINLINE(0x2F3C, 0, 0x11, 0x7000, 0xA82A);
  330. extern pascal ComponentResult SGIdle(SeqGrabComponent s)
  331.  FIVEWORDINLINE(0x2F3C, 0, 0x12, 0x7000, 0xA82A);
  332. extern pascal ComponentResult SGStop(SeqGrabComponent s)
  333.  FIVEWORDINLINE(0x2F3C, 0, 0x13, 0x7000, 0xA82A);
  334. extern pascal ComponentResult SGPause(SeqGrabComponent s, Byte pause)
  335.  FIVEWORDINLINE(0x2F3C, 0x2, 0x14, 0x7000, 0xA82A);
  336. extern pascal ComponentResult SGPrepare(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord)
  337.  FIVEWORDINLINE(0x2F3C, 0x4, 0x15, 0x7000, 0xA82A);
  338. extern pascal ComponentResult SGRelease(SeqGrabComponent s)
  339.  FIVEWORDINLINE(0x2F3C, 0, 0x16, 0x7000, 0xA82A);
  340. extern pascal Movie SGGetMovie(SeqGrabComponent s)
  341.  FIVEWORDINLINE(0x2F3C, 0, 0x17, 0x7000, 0xA82A);
  342. extern pascal ComponentResult SGSetMaximumRecordTime(SeqGrabComponent s, unsigned long ticks)
  343.  FIVEWORDINLINE(0x2F3C, 0x4, 0x18, 0x7000, 0xA82A);
  344. extern pascal ComponentResult SGGetMaximumRecordTime(SeqGrabComponent s, unsigned long *ticks)
  345.  FIVEWORDINLINE(0x2F3C, 0x4, 0x19, 0x7000, 0xA82A);
  346. extern pascal ComponentResult SGGetStorageSpaceRemaining(SeqGrabComponent s, unsigned long *bytes)
  347.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1A, 0x7000, 0xA82A);
  348. extern pascal ComponentResult SGGetTimeRemaining(SeqGrabComponent s, long *ticksLeft)
  349.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1B, 0x7000, 0xA82A);
  350. extern pascal ComponentResult SGGrabPict(SeqGrabComponent s, PicHandle *p, const Rect *bounds, short offscreenDepth, long grabPictFlags)
  351.  FIVEWORDINLINE(0x2F3C, 0xE, 0x1C, 0x7000, 0xA82A);
  352. extern pascal ComponentResult SGGetLastMovieResID(SeqGrabComponent s, short *resID)
  353.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1D, 0x7000, 0xA82A);
  354. extern pascal ComponentResult SGSetFlags(SeqGrabComponent s, long sgFlags)
  355.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1E, 0x7000, 0xA82A);
  356. extern pascal ComponentResult SGGetFlags(SeqGrabComponent s, long *sgFlags)
  357.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1F, 0x7000, 0xA82A);
  358. extern pascal ComponentResult SGSetDataProc(SeqGrabComponent s, SGDataUPP proc, long refCon)
  359.  FIVEWORDINLINE(0x2F3C, 0x8, 0x20, 0x7000, 0xA82A);
  360. extern pascal ComponentResult SGNewChannelFromComponent(SeqGrabComponent s, SGChannel *newChannel, Component sgChannelComponent)
  361.  FIVEWORDINLINE(0x2F3C, 0x8, 0x21, 0x7000, 0xA82A);
  362. extern pascal ComponentResult SGDisposeDeviceList(SeqGrabComponent s, SGDeviceList list)
  363.  FIVEWORDINLINE(0x2F3C, 0x4, 0x22, 0x7000, 0xA82A);
  364. extern pascal ComponentResult SGAppendDeviceListToMenu(SeqGrabComponent s, SGDeviceList list, MenuHandle mh)
  365.  FIVEWORDINLINE(0x2F3C, 0x8, 0x23, 0x7000, 0xA82A);
  366. extern pascal ComponentResult SGSetSettings(SeqGrabComponent s, UserData ud, long flags)
  367.  FIVEWORDINLINE(0x2F3C, 0x8, 0x24, 0x7000, 0xA82A);
  368. extern pascal ComponentResult SGGetSettings(SeqGrabComponent s, UserData *ud, long flags)
  369.  FIVEWORDINLINE(0x2F3C, 0x8, 0x25, 0x7000, 0xA82A);
  370. extern pascal ComponentResult SGGetIndChannel(SeqGrabComponent s, short index, SGChannel *ref, OSType *chanType)
  371.  FIVEWORDINLINE(0x2F3C, 0xA, 0x26, 0x7000, 0xA82A);
  372. extern pascal ComponentResult SGUpdate(SeqGrabComponent s, RgnHandle updateRgn)
  373.  FIVEWORDINLINE(0x2F3C, 0x4, 0x27, 0x7000, 0xA82A);
  374. extern pascal ComponentResult SGGetPause(SeqGrabComponent s, Byte *paused)
  375.  FIVEWORDINLINE(0x2F3C, 0x4, 0x28, 0x7000, 0xA82A);
  376. extern pascal ComponentResult SGSettingsDialog(SeqGrabComponent s, SGChannel c, short numPanels, Component *panelList, long flags, SGModalFilterUPP proc, long procRefNum)
  377.  FIVEWORDINLINE(0x2F3C, 0x16, 0x29, 0x7000, 0xA82A);
  378. extern pascal ComponentResult SGGetAlignmentProc(SeqGrabComponent s, ICMAlignmentProcRecordPtr alignmentProc)
  379.  FIVEWORDINLINE(0x2F3C, 0x4, 0x2A, 0x7000, 0xA82A);
  380. extern pascal ComponentResult SGSetChannelSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  381.  FIVEWORDINLINE(0x2F3C, 0xC, 0x2B, 0x7000, 0xA82A);
  382. extern pascal ComponentResult SGGetChannelSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  383.  FIVEWORDINLINE(0x2F3C, 0xC, 0x2C, 0x7000, 0xA82A);
  384. extern pascal ComponentResult SGWriteMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset)
  385.  FIVEWORDINLINE(0x2F3C, 0x10, 0x100, 0x7000, 0xA82A);
  386. extern pascal ComponentResult SGAddFrameReference(SeqGrabComponent s, seqGrabFrameInfo *frameInfo)
  387.  FIVEWORDINLINE(0x2F3C, 0x4, 0x101, 0x7000, 0xA82A);
  388. extern pascal ComponentResult SGGetNextFrameReference(SeqGrabComponent s, seqGrabFrameInfo *frameInfo, TimeValue *frameDuration, long *frameNumber)
  389.  FIVEWORDINLINE(0x2F3C, 0xC, 0x102, 0x7000, 0xA82A);
  390. extern pascal ComponentResult SGGetTimeBase(SeqGrabComponent s, TimeBase *tb)
  391.  FIVEWORDINLINE(0x2F3C, 0x4, 0x103, 0x7000, 0xA82A);
  392. extern pascal ComponentResult SGSortDeviceList(SeqGrabComponent s, SGDeviceList list)
  393.  FIVEWORDINLINE(0x2F3C, 0x4, 0x104, 0x7000, 0xA82A);
  394. extern pascal ComponentResult SGAddMovieData(SeqGrabComponent s, SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType)
  395.  FIVEWORDINLINE(0x2F3C, 0x1A, 0x105, 0x7000, 0xA82A);
  396. extern pascal ComponentResult SGChangedSource(SeqGrabComponent s, SGChannel c)
  397.  FIVEWORDINLINE(0x2F3C, 0x4, 0x106, 0x7000, 0xA82A);
  398. extern pascal ComponentResult SGSetChannelUsage(SGChannel c, long usage)
  399.  FIVEWORDINLINE(0x2F3C, 0x4, 0x80, 0x7000, 0xA82A);
  400. extern pascal ComponentResult SGGetChannelUsage(SGChannel c, long *usage)
  401.  FIVEWORDINLINE(0x2F3C, 0x4, 0x81, 0x7000, 0xA82A);
  402. extern pascal ComponentResult SGSetChannelBounds(SGChannel c, const Rect *bounds)
  403.  FIVEWORDINLINE(0x2F3C, 0x4, 0x82, 0x7000, 0xA82A);
  404. extern pascal ComponentResult SGGetChannelBounds(SGChannel c, Rect *bounds)
  405.  FIVEWORDINLINE(0x2F3C, 0x4, 0x83, 0x7000, 0xA82A);
  406. extern pascal ComponentResult SGSetChannelVolume(SGChannel c, short volume)
  407.  FIVEWORDINLINE(0x2F3C, 0x2, 0x84, 0x7000, 0xA82A);
  408. extern pascal ComponentResult SGGetChannelVolume(SGChannel c, short *volume)
  409.  FIVEWORDINLINE(0x2F3C, 0x4, 0x85, 0x7000, 0xA82A);
  410. extern pascal ComponentResult SGGetChannelInfo(SGChannel c, long *channelInfo)
  411.  FIVEWORDINLINE(0x2F3C, 0x4, 0x86, 0x7000, 0xA82A);
  412. extern pascal ComponentResult SGSetChannelPlayFlags(SGChannel c, long playFlags)
  413.  FIVEWORDINLINE(0x2F3C, 0x4, 0x87, 0x7000, 0xA82A);
  414. extern pascal ComponentResult SGGetChannelPlayFlags(SGChannel c, long *playFlags)
  415.  FIVEWORDINLINE(0x2F3C, 0x4, 0x88, 0x7000, 0xA82A);
  416. extern pascal ComponentResult SGSetChannelMaxFrames(SGChannel c, long frameCount)
  417.  FIVEWORDINLINE(0x2F3C, 0x4, 0x89, 0x7000, 0xA82A);
  418. extern pascal ComponentResult SGGetChannelMaxFrames(SGChannel c, long *frameCount)
  419.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8A, 0x7000, 0xA82A);
  420. extern pascal ComponentResult SGSetChannelRefCon(SGChannel c, long refCon)
  421.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8B, 0x7000, 0xA82A);
  422. extern pascal ComponentResult SGSetChannelClip(SGChannel c, RgnHandle theClip)
  423.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8C, 0x7000, 0xA82A);
  424. extern pascal ComponentResult SGGetChannelClip(SGChannel c, RgnHandle *theClip)
  425.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8D, 0x7000, 0xA82A);
  426. extern pascal ComponentResult SGGetChannelSampleDescription(SGChannel c, Handle sampleDesc)
  427.  FIVEWORDINLINE(0x2F3C, 0x4, 0x8E, 0x7000, 0xA82A);
  428. extern pascal ComponentResult SGGetChannelDeviceList(SGChannel c, long selectionFlags, SGDeviceList *list)
  429.  FIVEWORDINLINE(0x2F3C, 0x8, 0x8F, 0x7000, 0xA82A);
  430. extern pascal ComponentResult SGSetChannelDevice(SGChannel c, StringPtr name)
  431.  FIVEWORDINLINE(0x2F3C, 0x4, 0x90, 0x7000, 0xA82A);
  432. extern pascal ComponentResult SGSetChannelMatrix(SGChannel c, const MatrixRecord *m)
  433.  FIVEWORDINLINE(0x2F3C, 0x4, 0x91, 0x7000, 0xA82A);
  434. extern pascal ComponentResult SGGetChannelMatrix(SGChannel c, MatrixRecord *m)
  435.  FIVEWORDINLINE(0x2F3C, 0x4, 0x92, 0x7000, 0xA82A);
  436. extern pascal ComponentResult SGGetChannelTimeScale(SGChannel c, TimeScale *scale)
  437.  FIVEWORDINLINE(0x2F3C, 0x4, 0x93, 0x7000, 0xA82A);
  438. extern pascal ComponentResult SGChannelPutPicture(SGChannel c)
  439.  FIVEWORDINLINE(0x2F3C, 0, 0x94, 0x7000, 0xA82A);
  440. extern pascal ComponentResult SGInitChannel(SGChannel c, SeqGrabComponent owner)
  441.  FIVEWORDINLINE(0x2F3C, 0x4, 0x180, 0x7000, 0xA82A);
  442. extern pascal ComponentResult SGWriteSamples(SGChannel c, Movie m, AliasHandle theFile)
  443.  FIVEWORDINLINE(0x2F3C, 0x8, 0x181, 0x7000, 0xA82A);
  444. extern pascal ComponentResult SGGetDataRate(SGChannel c, long *bytesPerSecond)
  445.  FIVEWORDINLINE(0x2F3C, 0x4, 0x182, 0x7000, 0xA82A);
  446. extern pascal ComponentResult SGAlignChannelRect(SGChannel c, Rect *r)
  447.  FIVEWORDINLINE(0x2F3C, 0x4, 0x183, 0x7000, 0xA82A);
  448. extern pascal ComponentResult SGPanelGetDitl(SeqGrabComponent s, Handle *ditl)
  449.  FIVEWORDINLINE(0x2F3C, 0x4, 0x200, 0x7000, 0xA82A);
  450. extern pascal ComponentResult SGPanelGetTitle(SeqGrabComponent s, Str255 title)
  451.  FIVEWORDINLINE(0x2F3C, 0x4, 0x201, 0x7000, 0xA82A);
  452. extern pascal ComponentResult SGPanelCanRun(SeqGrabComponent s, SGChannel c)
  453.  FIVEWORDINLINE(0x2F3C, 0x4, 0x202, 0x7000, 0xA82A);
  454. extern pascal ComponentResult SGPanelInstall(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  455.  FIVEWORDINLINE(0x2F3C, 0xA, 0x203, 0x7000, 0xA82A);
  456. extern pascal ComponentResult SGPanelEvent(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord *theEvent, short *itemHit, Boolean *handled)
  457.  FIVEWORDINLINE(0x2F3C, 0x16, 0x204, 0x7000, 0xA82A);
  458. extern pascal ComponentResult SGPanelItem(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum)
  459.  FIVEWORDINLINE(0x2F3C, 0xC, 0x205, 0x7000, 0xA82A);
  460. extern pascal ComponentResult SGPanelRemove(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset)
  461.  FIVEWORDINLINE(0x2F3C, 0xA, 0x206, 0x7000, 0xA82A);
  462. extern pascal ComponentResult SGPanelSetGrabber(SeqGrabComponent s, SeqGrabComponent sg)
  463.  FIVEWORDINLINE(0x2F3C, 0x4, 0x207, 0x7000, 0xA82A);
  464. extern pascal ComponentResult SGPanelSetResFile(SeqGrabComponent s, short resRef)
  465.  FIVEWORDINLINE(0x2F3C, 0x2, 0x208, 0x7000, 0xA82A);
  466. extern pascal ComponentResult SGPanelGetSettings(SeqGrabComponent s, SGChannel c, UserData *ud, long flags)
  467.  FIVEWORDINLINE(0x2F3C, 0xC, 0x209, 0x7000, 0xA82A);
  468. extern pascal ComponentResult SGPanelSetSettings(SeqGrabComponent s, SGChannel c, UserData ud, long flags)
  469.  FIVEWORDINLINE(0x2F3C, 0xC, 0x20A, 0x7000, 0xA82A);
  470. extern pascal ComponentResult SGPanelValidateInput(SeqGrabComponent s, Boolean *ok)
  471.  FIVEWORDINLINE(0x2F3C, 0x4, 0x20B, 0x7000, 0xA82A);
  472. #ifdef __cplusplus
  473. }
  474. #endif
  475.  
  476. #if defined(powerc) || defined (__powerc)
  477. #pragma options align=mac68k
  478. #endif
  479. struct SGCompressInfo {
  480.     Ptr                            buffer;
  481.     unsigned long                bufferSize;
  482.     unsigned char                similarity;
  483.     unsigned char                reserved;
  484. };
  485. #if defined(powerc) || defined(__powerc)
  486. #pragma options align=reset
  487. #endif
  488.  
  489. typedef struct SGCompressInfo SGCompressInfo;
  490.  
  491. typedef pascal ComponentResult (*SGGrabProcPtr)(SGChannel c, short bufferNum, long refCon);
  492.  
  493. enum {
  494.     uppSGGrabProcInfo = kPascalStackBased
  495.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  496.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  497.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  498.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  499. };
  500.  
  501. #if USESROUTINEDESCRIPTORS
  502. typedef UniversalProcPtr SGGrabUPP;
  503.  
  504. #define CallSGGrabProc(userRoutine, c, bufferNum, refCon)        \
  505.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGGrabProcInfo, (c), (bufferNum), (refCon))
  506. #define NewSGGrabProc(userRoutine)        \
  507.         (SGGrabUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabProcInfo, GetCurrentISA())
  508. #else
  509. typedef SGGrabProcPtr SGGrabUPP;
  510.  
  511. #define CallSGGrabProc(userRoutine, c, bufferNum, refCon)        \
  512.         (*(userRoutine))((c), (bufferNum), (refCon))
  513. #define NewSGGrabProc(userRoutine)        \
  514.         (SGGrabUPP)(userRoutine)
  515. #endif
  516.  
  517. typedef pascal ComponentResult (*SGGrabCompleteProcPtr)(SGChannel c, short bufferNum, Boolean *done, long refCon);
  518.  
  519. enum {
  520.     uppSGGrabCompleteProcInfo = kPascalStackBased
  521.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  522.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  523.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  524.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean*)))
  525.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  526. };
  527.  
  528. #if USESROUTINEDESCRIPTORS
  529. typedef UniversalProcPtr SGGrabCompleteUPP;
  530.  
  531. #define CallSGGrabCompleteProc(userRoutine, c, bufferNum, done, refCon)        \
  532.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGGrabCompleteProcInfo, (c), (bufferNum), (done), (refCon))
  533. #define NewSGGrabCompleteProc(userRoutine)        \
  534.         (SGGrabCompleteUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabCompleteProcInfo, GetCurrentISA())
  535. #else
  536. typedef SGGrabCompleteProcPtr SGGrabCompleteUPP;
  537.  
  538. #define CallSGGrabCompleteProc(userRoutine, c, bufferNum, done, refCon)        \
  539.         (*(userRoutine))((c), (bufferNum), (done), (refCon))
  540. #define NewSGGrabCompleteProc(userRoutine)        \
  541.         (SGGrabCompleteUPP)(userRoutine)
  542. #endif
  543.  
  544. typedef pascal ComponentResult (*SGDisplayProcPtr)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  545.  
  546. enum {
  547.     uppSGDisplayProcInfo = kPascalStackBased
  548.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  549.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  550.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  551.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord*)))
  552.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(RgnHandle)))
  553.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  554. };
  555.  
  556. #if USESROUTINEDESCRIPTORS
  557. typedef UniversalProcPtr SGDisplayUPP;
  558.  
  559. #define CallSGDisplayProc(userRoutine, c, bufferNum, mp, clipRgn, refCon)        \
  560.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGDisplayProcInfo, (c), (bufferNum), (mp), (clipRgn), (refCon))
  561. #define NewSGDisplayProc(userRoutine)        \
  562.         (SGDisplayUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDisplayProcInfo, GetCurrentISA())
  563. #else
  564. typedef SGDisplayProcPtr SGDisplayUPP;
  565.  
  566. #define CallSGDisplayProc(userRoutine, c, bufferNum, mp, clipRgn, refCon)        \
  567.         (*(userRoutine))((c), (bufferNum), (mp), (clipRgn), (refCon))
  568. #define NewSGDisplayProc(userRoutine)        \
  569.         (SGDisplayUPP)(userRoutine)
  570. #endif
  571.  
  572. typedef pascal ComponentResult (*SGCompressProcPtr)(SGChannel c, short bufferNum, long refCon);
  573.  
  574. enum {
  575.     uppSGCompressProcInfo = kPascalStackBased
  576.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  577.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  578.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  579.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  580. };
  581.  
  582. #if USESROUTINEDESCRIPTORS
  583. typedef UniversalProcPtr SGCompressUPP;
  584.  
  585. #define CallSGCompressProc(userRoutine, c, bufferNum, refCon)        \
  586.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGCompressProcInfo, (c), (bufferNum), (refCon))
  587. #define NewSGCompressProc(userRoutine)        \
  588.         (SGCompressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGCompressProcInfo, GetCurrentISA())
  589. #else
  590. typedef SGCompressProcPtr SGCompressUPP;
  591.  
  592. #define CallSGCompressProc(userRoutine, c, bufferNum, refCon)        \
  593.         (*(userRoutine))((c), (bufferNum), (refCon))
  594. #define NewSGCompressProc(userRoutine)        \
  595.         (SGCompressUPP)(userRoutine)
  596. #endif
  597.  
  598. typedef pascal ComponentResult (*SGCompressCompleteProcPtr)(SGChannel c, short bufferNum, Boolean *done, SGCompressInfo *ci, long refCon);
  599.  
  600. enum {
  601.     uppSGCompressCompleteProcInfo = kPascalStackBased
  602.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  603.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  604.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  605.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean*)))
  606.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(SGCompressInfo*)))
  607.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  608. };
  609.  
  610. #if USESROUTINEDESCRIPTORS
  611. typedef UniversalProcPtr SGCompressCompleteUPP;
  612.  
  613. #define CallSGCompressCompleteProc(userRoutine, c, bufferNum, done, ci, refCon)        \
  614.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGCompressCompleteProcInfo, (c), (bufferNum), (done), (ci), (refCon))
  615. #define NewSGCompressCompleteProc(userRoutine)        \
  616.         (SGCompressCompleteUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGCompressCompleteProcInfo, GetCurrentISA())
  617. #else
  618. typedef SGCompressCompleteProcPtr SGCompressCompleteUPP;
  619.  
  620. #define CallSGCompressCompleteProc(userRoutine, c, bufferNum, done, ci, refCon)        \
  621.         (*(userRoutine))((c), (bufferNum), (done), (ci), (refCon))
  622. #define NewSGCompressCompleteProc(userRoutine)        \
  623.         (SGCompressCompleteUPP)(userRoutine)
  624. #endif
  625.  
  626. typedef pascal ComponentResult (*SGAddFrameProcPtr)(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale, const SGCompressInfo *ci, long refCon);
  627.  
  628. enum {
  629.     uppSGAddFrameProcInfo = kPascalStackBased
  630.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  631.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  632.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  633.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(TimeValue)))
  634.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(TimeScale)))
  635.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(SGCompressInfo*)))
  636.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
  637. };
  638.  
  639. #if USESROUTINEDESCRIPTORS
  640. typedef UniversalProcPtr SGAddFrameUPP;
  641.  
  642. #define CallSGAddFrameProc(userRoutine, c, bufferNum, atTime, scale, ci, refCon)        \
  643.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGAddFrameProcInfo, (c), (bufferNum), (atTime), (scale), (ci), (refCon))
  644. #define NewSGAddFrameProc(userRoutine)        \
  645.         (SGAddFrameUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGAddFrameProcInfo, GetCurrentISA())
  646. #else
  647. typedef SGAddFrameProcPtr SGAddFrameUPP;
  648.  
  649. #define CallSGAddFrameProc(userRoutine, c, bufferNum, atTime, scale, ci, refCon)        \
  650.         (*(userRoutine))((c), (bufferNum), (atTime), (scale), (ci), (refCon))
  651. #define NewSGAddFrameProc(userRoutine)        \
  652.         (SGAddFrameUPP)(userRoutine)
  653. #endif
  654.  
  655. typedef pascal ComponentResult (*SGTransferFrameProcPtr)(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  656.  
  657. enum {
  658.     uppSGTransferFrameProcInfo = kPascalStackBased
  659.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  660.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  661.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  662.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(MatrixRecord*)))
  663.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(RgnHandle)))
  664.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  665. };
  666.  
  667. #if USESROUTINEDESCRIPTORS
  668. typedef UniversalProcPtr SGTransferFrameUPP;
  669.  
  670. #define CallSGTransferFrameProc(userRoutine, c, bufferNum, mp, clipRgn, refCon)        \
  671.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGTransferFrameProcInfo, (c), (bufferNum), (mp), (clipRgn), (refCon))
  672. #define NewSGTransferFrameProc(userRoutine)        \
  673.         (SGTransferFrameUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGTransferFrameProcInfo, GetCurrentISA())
  674. #else
  675. typedef SGTransferFrameProcPtr SGTransferFrameUPP;
  676.  
  677. #define CallSGTransferFrameProc(userRoutine, c, bufferNum, mp, clipRgn, refCon)        \
  678.         (*(userRoutine))((c), (bufferNum), (mp), (clipRgn), (refCon))
  679. #define NewSGTransferFrameProc(userRoutine)        \
  680.         (SGTransferFrameUPP)(userRoutine)
  681. #endif
  682.  
  683. typedef pascal ComponentResult (*SGGrabCompressCompleteProcPtr)(SGChannel c, Boolean *done, SGCompressInfo *ci, TimeRecord *t, long refCon);
  684.  
  685. enum {
  686.     uppSGGrabCompressCompleteProcInfo = kPascalStackBased
  687.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  688.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  689.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Boolean*)))
  690.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(SGCompressInfo*)))
  691.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(TimeRecord*)))
  692.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  693. };
  694.  
  695. #if USESROUTINEDESCRIPTORS
  696. typedef UniversalProcPtr SGGrabCompressCompleteUPP;
  697.  
  698. #define CallSGGrabCompressCompleteProc(userRoutine, c, done, ci, t, refCon)        \
  699.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGGrabCompressCompleteProcInfo, (c), (done), (ci), (t), (refCon))
  700. #define NewSGGrabCompressCompleteProc(userRoutine)        \
  701.         (SGGrabCompressCompleteUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGGrabCompressCompleteProcInfo, GetCurrentISA())
  702. #else
  703. typedef SGGrabCompressCompleteProcPtr SGGrabCompressCompleteUPP;
  704.  
  705. #define CallSGGrabCompressCompleteProc(userRoutine, c, done, ci, t, refCon)        \
  706.         (*(userRoutine))((c), (done), (ci), (t), (refCon))
  707. #define NewSGGrabCompressCompleteProc(userRoutine)        \
  708.         (SGGrabCompressCompleteUPP)(userRoutine)
  709. #endif
  710.  
  711. typedef pascal ComponentResult (*SGDisplayCompressProcPtr)(SGChannel c, Ptr dataPtr, ImageDescriptionHandle desc, MatrixRecord *mp, RgnHandle clipRgn, long refCon);
  712.  
  713. enum {
  714.     uppSGDisplayCompressProcInfo = kPascalStackBased
  715.          | RESULT_SIZE(SIZE_CODE(sizeof(ComponentResult)))
  716.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SGChannel)))
  717.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  718.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ImageDescriptionHandle)))
  719.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(MatrixRecord*)))
  720.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  721.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
  722. };
  723.  
  724. #if USESROUTINEDESCRIPTORS
  725. typedef UniversalProcPtr SGDisplayCompressUPP;
  726.  
  727. #define CallSGDisplayCompressProc(userRoutine, c, dataPtr, desc, mp, clipRgn, refCon)        \
  728.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSGDisplayCompressProcInfo, (c), (dataPtr), (desc), (mp), (clipRgn), (refCon))
  729. #define NewSGDisplayCompressProc(userRoutine)        \
  730.         (SGDisplayCompressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSGDisplayCompressProcInfo, GetCurrentISA())
  731. #else
  732. typedef SGDisplayCompressProcPtr SGDisplayCompressUPP;
  733.  
  734. #define CallSGDisplayCompressProc(userRoutine, c, dataPtr, desc, mp, clipRgn, refCon)        \
  735.         (*(userRoutine))((c), (dataPtr), (desc), (mp), (clipRgn), (refCon))
  736. #define NewSGDisplayCompressProc(userRoutine)        \
  737.         (SGDisplayCompressUPP)(userRoutine)
  738. #endif
  739.  
  740. #if defined(powerc) || defined (__powerc)
  741. #pragma options align=mac68k
  742. #endif
  743. struct VideoBottles {
  744.     short                        procCount;
  745.     SGGrabUPP                    grabProc;
  746.     SGGrabCompleteUPP            grabCompleteProc;
  747.     SGDisplayUPP                displayProc;
  748.     SGCompressUPP                compressProc;
  749.     SGCompressCompleteUPP        compressCompleteProc;
  750.     SGAddFrameUPP                addFrameProc;
  751.     SGTransferFrameUPP            transferFrameProc;
  752.     SGGrabCompressCompleteUPP    grabCompressCompleteProc;
  753.     SGDisplayCompressUPP        displayCompressProc;
  754. };
  755. #if defined(powerc) || defined(__powerc)
  756. #pragma options align=reset
  757. #endif
  758.  
  759. typedef struct VideoBottles VideoBottles;
  760.  
  761. #ifdef __cplusplus
  762. extern "C" {
  763. #endif
  764.  
  765. extern pascal ComponentResult SGGetSrcVideoBounds(SGChannel c, Rect *r)
  766.  FIVEWORDINLINE(0x2F3C, 0x4, 0x100, 0x7000, 0xA82A);
  767. extern pascal ComponentResult SGSetVideoRect(SGChannel c, Rect *r)
  768.  FIVEWORDINLINE(0x2F3C, 0x4, 0x101, 0x7000, 0xA82A);
  769. extern pascal ComponentResult SGGetVideoRect(SGChannel c, Rect *r)
  770.  FIVEWORDINLINE(0x2F3C, 0x4, 0x102, 0x7000, 0xA82A);
  771. extern pascal ComponentResult SGGetVideoCompressorType(SGChannel c, OSType *compressorType)
  772.  FIVEWORDINLINE(0x2F3C, 0x4, 0x103, 0x7000, 0xA82A);
  773. extern pascal ComponentResult SGSetVideoCompressorType(SGChannel c, OSType compressorType)
  774.  FIVEWORDINLINE(0x2F3C, 0x4, 0x104, 0x7000, 0xA82A);
  775. extern pascal ComponentResult SGSetVideoCompressor(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  776.  FIVEWORDINLINE(0x2F3C, 0x12, 0x105, 0x7000, 0xA82A);
  777. extern pascal ComponentResult SGGetVideoCompressor(SGChannel c, short *depth, CompressorComponent *compressor, CodecQ *spatialQuality, CodecQ *temporalQuality, long *keyFrameRate)
  778.  FIVEWORDINLINE(0x2F3C, 0x14, 0x106, 0x7000, 0xA82A);
  779. extern pascal ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
  780.  FIVEWORDINLINE(0x2F3C, 0, 0x107, 0x7000, 0xA82A);
  781. extern pascal ComponentResult SGSetVideoDigitizerComponent(SGChannel c, ComponentInstance vdig)
  782.  FIVEWORDINLINE(0x2F3C, 0x4, 0x108, 0x7000, 0xA82A);
  783. extern pascal ComponentResult SGVideoDigitizerChanged(SGChannel c)
  784.  FIVEWORDINLINE(0x2F3C, 0, 0x109, 0x7000, 0xA82A);
  785. extern pascal ComponentResult SGSetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  786.  FIVEWORDINLINE(0x2F3C, 0x4, 0x10A, 0x7000, 0xA82A);
  787. extern pascal ComponentResult SGGetVideoBottlenecks(SGChannel c, VideoBottles *vb)
  788.  FIVEWORDINLINE(0x2F3C, 0x4, 0x10B, 0x7000, 0xA82A);
  789. extern pascal ComponentResult SGGrabFrame(SGChannel c, short bufferNum)
  790.  FIVEWORDINLINE(0x2F3C, 0x2, 0x10C, 0x7000, 0xA82A);
  791. extern pascal ComponentResult SGGrabFrameComplete(SGChannel c, short bufferNum, Boolean *done)
  792.  FIVEWORDINLINE(0x2F3C, 0x6, 0x10D, 0x7000, 0xA82A);
  793. extern pascal ComponentResult SGDisplayFrame(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn)
  794.  FIVEWORDINLINE(0x2F3C, 0xA, 0x10E, 0x7000, 0xA82A);
  795. extern pascal ComponentResult SGCompressFrame(SGChannel c, short bufferNum)
  796.  FIVEWORDINLINE(0x2F3C, 0x2, 0x10F, 0x7000, 0xA82A);
  797. extern pascal ComponentResult SGCompressFrameComplete(SGChannel c, short bufferNum, Boolean *done, SGCompressInfo *ci)
  798.  FIVEWORDINLINE(0x2F3C, 0xA, 0x110, 0x7000, 0xA82A);
  799. extern pascal ComponentResult SGAddFrame(SGChannel c, short bufferNum, TimeValue atTime, TimeScale scale, const SGCompressInfo *ci)
  800.  FIVEWORDINLINE(0x2F3C, 0xE, 0x111, 0x7000, 0xA82A);
  801. extern pascal ComponentResult SGTransferFrameForCompress(SGChannel c, short bufferNum, MatrixRecord *mp, RgnHandle clipRgn)
  802.  FIVEWORDINLINE(0x2F3C, 0xA, 0x112, 0x7000, 0xA82A);
  803. extern pascal ComponentResult SGSetCompressBuffer(SGChannel c, short depth, const Rect *compressSize)
  804.  FIVEWORDINLINE(0x2F3C, 0x6, 0x113, 0x7000, 0xA82A);
  805. extern pascal ComponentResult SGGetCompressBuffer(SGChannel c, short *depth, Rect *compressSize)
  806.  FIVEWORDINLINE(0x2F3C, 0x8, 0x114, 0x7000, 0xA82A);
  807. extern pascal ComponentResult SGGetBufferInfo(SGChannel c, short bufferNum, PixMapHandle *bufferPM, Rect *bufferRect, GWorldPtr *compressBuffer, Rect *compressBufferRect)
  808.  FIVEWORDINLINE(0x2F3C, 0x12, 0x115, 0x7000, 0xA82A);
  809. extern pascal ComponentResult SGSetUseScreenBuffer(SGChannel c, Boolean useScreenBuffer)
  810.  FIVEWORDINLINE(0x2F3C, 0x2, 0x116, 0x7000, 0xA82A);
  811. extern pascal ComponentResult SGGetUseScreenBuffer(SGChannel c, Boolean *useScreenBuffer)
  812.  FIVEWORDINLINE(0x2F3C, 0x4, 0x117, 0x7000, 0xA82A);
  813. extern pascal ComponentResult SGGrabCompressComplete(SGChannel c, Boolean *done, SGCompressInfo *ci, TimeRecord *tr)
  814.  FIVEWORDINLINE(0x2F3C, 0xC, 0x118, 0x7000, 0xA82A);
  815. extern pascal ComponentResult SGDisplayCompress(SGChannel c, Ptr dataPtr, ImageDescriptionHandle desc, MatrixRecord *mp, RgnHandle clipRgn)
  816.  FIVEWORDINLINE(0x2F3C, 0x10, 0x119, 0x7000, 0xA82A);
  817. extern pascal ComponentResult SGSetFrameRate(SGChannel c, Fixed frameRate)
  818.  FIVEWORDINLINE(0x2F3C, 0x4, 0x11A, 0x7000, 0xA82A);
  819. extern pascal ComponentResult SGGetFrameRate(SGChannel c, Fixed *frameRate)
  820.  FIVEWORDINLINE(0x2F3C, 0x4, 0x11B, 0x7000, 0xA82A);
  821. #ifdef __cplusplus
  822. }
  823. #endif
  824.  
  825. #ifdef __cplusplus
  826. extern "C" {
  827. #endif
  828.  
  829. extern pascal ComponentResult SGSetSoundInputDriver(SGChannel c, const Str255 driverName)
  830.  FIVEWORDINLINE(0x2F3C, 0x4, 0x100, 0x7000, 0xA82A);
  831. extern pascal long SGGetSoundInputDriver(SGChannel c)
  832.  FIVEWORDINLINE(0x2F3C, 0, 0x101, 0x7000, 0xA82A);
  833. extern pascal ComponentResult SGSoundInputDriverChanged(SGChannel c)
  834.  FIVEWORDINLINE(0x2F3C, 0, 0x102, 0x7000, 0xA82A);
  835. extern pascal ComponentResult SGSetSoundRecordChunkSize(SGChannel c, long seconds)
  836.  FIVEWORDINLINE(0x2F3C, 0x4, 0x103, 0x7000, 0xA82A);
  837. extern pascal long SGGetSoundRecordChunkSize(SGChannel c)
  838.  FIVEWORDINLINE(0x2F3C, 0, 0x104, 0x7000, 0xA82A);
  839. extern pascal ComponentResult SGSetSoundInputRate(SGChannel c, Fixed rate)
  840.  FIVEWORDINLINE(0x2F3C, 0x4, 0x105, 0x7000, 0xA82A);
  841. extern pascal Fixed SGGetSoundInputRate(SGChannel c)
  842.  FIVEWORDINLINE(0x2F3C, 0, 0x106, 0x7000, 0xA82A);
  843. extern pascal ComponentResult SGSetSoundInputParameters(SGChannel c, short sampleSize, short numChannels, OSType compressionType)
  844.  FIVEWORDINLINE(0x2F3C, 0x8, 0x107, 0x7000, 0xA82A);
  845. extern pascal ComponentResult SGGetSoundInputParameters(SGChannel c, short *sampleSize, short *numChannels, OSType *compressionType)
  846.  FIVEWORDINLINE(0x2F3C, 0xC, 0x108, 0x7000, 0xA82A);
  847. #ifdef __cplusplus
  848. }
  849. #endif
  850.  
  851. #define sgChannelAtom 'chan'
  852.  
  853. #define sgChannelSettingsAtom 'ctom'
  854.  
  855. #define sgChannelDescription 'cdsc'
  856.  
  857. #define sgChannelSettings 'cset'
  858.  
  859. #define sgDeviceNameType 'name'
  860.  
  861. #define sgUsageType 'use '
  862.  
  863. #define sgPlayFlagsType 'plyf'
  864.  
  865. #define sgClipType 'clip'
  866.  
  867. #define sgMatrixType 'mtrx'
  868.  
  869. #define sgVolumeType 'volu'
  870.  
  871. #define sgPanelSettingsAtom 'ptom'
  872.  
  873. #define sgPanelDescription 'pdsc'
  874.  
  875. #define sgPanelSettings 'pset'
  876.  
  877. #define sgcSoundCompressionType 'scmp'
  878.  
  879. #define sgcSoundSampleRateType 'srat'
  880.  
  881. #define sgcSoundChannelCountType 'schn'
  882.  
  883. #define sgcSoundSampleSizeType 'ssiz'
  884.  
  885. #define sgcSoundInputType 'sinp'
  886.  
  887. #define sgcSoundGainType 'gain'
  888.  
  889. #define sgcVideoHueType 'hue '
  890.  
  891. #define sgcVideoSaturationType 'satr'
  892.  
  893. #define sgcVideoContrastType 'trst'
  894.  
  895. #define sgcVideoSharpnessType 'shrp'
  896.  
  897. #define sgcVideoBrigtnessType 'brit'
  898.  
  899. #define sgcVideoBlackLevelType 'blkl'
  900.  
  901. #define sgcVideoWhiteLevelType 'whtl'
  902.  
  903. #define sgcVideoInputType 'vinp'
  904.  
  905. #define sgcVideoFormatType 'vstd'
  906.  
  907. #define sgcVideoFilterType 'vflt'
  908.  
  909. #define sgcVideoRectType 'vrct'
  910.  
  911. #define sgVideoDigitizerType 'vdig'
  912.  
  913. enum  {
  914.     kSGInitializeSelect            = 0x1,
  915.     kSGSetDataOutputSelect        = 0x2,
  916.     kSGGetDataOutputSelect        = 0x3,
  917.     kSGSetGWorldSelect            = 0x4,
  918.     kSGGetGWorldSelect            = 0x5,
  919.     kSGNewChannelSelect            = 0x6,
  920.     kSGDisposeChannelSelect        = 0x7,
  921.     kSGStartPreviewSelect        = 0x10,
  922.     kSGStartRecordSelect        = 0x11,
  923.     kSGIdleSelect                = 0x12,
  924.     kSGStopSelect                = 0x13,
  925.     kSGPauseSelect                = 0x14,
  926.     kSGPrepareSelect            = 0x15,
  927.     kSGReleaseSelect            = 0x16,
  928.     kSGGetMovieSelect            = 0x17,
  929.     kSGSetMaximumRecordTimeSelect = 0x18,
  930.     kSGGetMaximumRecordTimeSelect = 0x19,
  931.     kSGGetStorageSpaceRemainingSelect = 0x1A,
  932.     kSGGetTimeRemainingSelect    = 0x1B,
  933.     kSGGrabPictSelect            = 0x1C,
  934.     kSGGetLastMovieResIDSelect    = 0x1D,
  935.     kSGSetFlagsSelect            = 0x1E,
  936.     kSGGetFlagsSelect            = 0x1F,
  937.     kSGSetDataProcSelect        = 0x20,
  938.     kSGNewChannelFromComponentSelect = 0x21,
  939.     kSGDisposeDeviceListSelect    = 0x22,
  940.     kSGAppendDeviceListToMenuSelect = 0x23,
  941.     kSGSetSettingsSelect        = 0x24,
  942.     kSGGetSettingsSelect        = 0x25,
  943.     kSGGetIndChannelSelect        = 0x26,
  944.     kSGUpdateSelect                = 0x27,
  945.     kSGGetPauseSelect            = 0x28,
  946.     kSGSettingsDialogSelect        = 0x29,
  947.     kSGGetAlignmentProcSelect    = 0x2A,
  948.     kSGSetChannelSettingsSelect    = 0x2B,
  949.     kSGGetChannelSettingsSelect    = 0x2C,
  950.     kSGWriteMovieDataSelect        = 0x100,
  951.     kSGAddFrameReferenceSelect    = 0x101,
  952.     kSGGetNextFrameReferenceSelect = 0x102,
  953.     kSGGetTimeBaseSelect        = 0x103,
  954.     kSGSortDeviceListSelect        = 0x104,
  955.     kSGAddMovieDataSelect        = 0x105,
  956.     kSGChangedSourceSelect        = 0x106,
  957.     kSGCSetChannelUsageSelect    = 0x80,
  958.     kSGCGetChannelUsageSelect    = 0x81,
  959.     kSGCSetChannelBoundsSelect    = 0x82,
  960.     kSGCGetChannelBoundsSelect    = 0x83,
  961.     kSGCSetChannelVolumeSelect    = 0x84,
  962.     kSGCGetChannelVolumeSelect    = 0x85,
  963.     kSGCGetChannelInfoSelect    = 0x86,
  964.     kSGCSetChannelPlayFlagsSelect = 0x87,
  965.     kSGCGetChannelPlayFlagsSelect = 0x88,
  966.     kSGCSetChannelMaxFramesSelect = 0x89,
  967.     kSGCGetChannelMaxFramesSelect = 0x8A,
  968.     kSGCSetChannelRefConSelect    = 0x8B,
  969.     kSGCSetChannelClipSelect    = 0x8C,
  970.     kSGCGetChannelClipSelect    = 0x8D,
  971.     kSGCGetChannelSampleDescriptionSelect = 0x8E,
  972.     kSGCGetChannelDeviceListSelect = 0x8F,
  973.     kSGCSetChannelDeviceSelect    = 0x90,
  974.     kSGCSetChannelMatrixSelect    = 0x91,
  975.     kSGCGetChannelMatrixSelect    = 0x92,
  976.     kSGCGetChannelTimeScaleSelect = 0x93,
  977.     kSGCChannelPutPictureSelect    = 0x94,
  978.     kSGCInitChannelSelect        = 0x180,
  979.     kSGCWriteSamplesSelect        = 0x181,
  980.     kSGCGetDataRateSelect        = 0x182,
  981.     kSGCAlignChannelRectSelect    = 0x183,
  982.     kSGCPanelGetDitlSelect        = 0x200,
  983.     kSGCPanelGetTitleSelect        = 0x201,
  984.     kSGCPanelCanRunSelect        = 0x202,
  985.     kSGCPanelInstallSelect        = 0x203,
  986.     kSGCPanelEventSelect        = 0x204,
  987.     kSGCPanelItemSelect            = 0x205,
  988.     kSGCPanelRemoveSelect        = 0x206,
  989.     kSGCPanelSetGrabberSelect    = 0x207,
  990.     kSGCPanelSetResFileSelect    = 0x208,
  991.     kSGCPanelGetSettingsSelect    = 0x209,
  992.     kSGCPanelSetSettingsSelect    = 0x20A,
  993.     kSGCPanelValidateInputSelect = 0x20B,
  994.     kSGCGetSrcVideoBoundsSelect    = 0x100,
  995.     kSGCSetVideoRectSelect        = 0x101,
  996.     kSGCGetVideoRectSelect        = 0x102,
  997.     kSGCGetVideoCompressorTypeSelect = 0x103,
  998.     kSGCSetVideoCompressorTypeSelect = 0x104,
  999.     kSGCSetVideoCompressorSelect = 0x105,
  1000.     kSGCGetVideoCompressorSelect = 0x106,
  1001.     kSGCGetVideoDigitizerComponentSelect = 0x107,
  1002.     kSGCSetVideoDigitizerComponentSelect = 0x108,
  1003.     kSGCVideoDigitizerChangedSelect = 0x109,
  1004.     kSGCSetVideoBottlenecksSelect = 0x10A,
  1005.     kSGCGetVideoBottlenecksSelect = 0x10B,
  1006.     kSGCGrabFrameSelect            = 0x10C,
  1007.     kSGCGrabFrameCompleteSelect    = 0x10D,
  1008.     kSGCDisplayFrameSelect        = 0x10E,
  1009.     kSGCCompressFrameSelect        = 0x10F,
  1010.     kSGCCompressFrameCompleteSelect = 0x110,
  1011.     kSGCAddFrameSelect            = 0x111,
  1012.     kSGCTransferFrameForCompressSelect = 0x112,
  1013.     kSGCSetCompressBufferSelect    = 0x113,
  1014.     kSGCGetCompressBufferSelect    = 0x114,
  1015.     kSGCGetBufferInfoSelect        = 0x115,
  1016.     kSGCSetUseScreenBufferSelect = 0x116,
  1017.     kSGCGetUseScreenBufferSelect = 0x117,
  1018.     kSGCGrabCompressCompleteSelect = 0x118,
  1019.     kSGCDisplayCompressSelect    = 0x119,
  1020.     kSGCSetFrameRateSelect        = 0x11A,
  1021.     kSGCGetFrameRateSelect        = 0x11B,
  1022.     kSGCSetSoundInputDriverSelect = 0x100,
  1023.     kSGCGetSoundInputDriverSelect = 0x101,
  1024.     kSGCSoundInputDriverChangedSelect = 0x102,
  1025.     kSGCSetSoundRecordChunkSizeSelect = 0x103,
  1026.     kSGCGetSoundRecordChunkSizeSelect = 0x104,
  1027.     kSGCSetSoundInputRateSelect    = 0x105,
  1028.     kSGCGetSoundInputRateSelect    = 0x106,
  1029.     kSGCSetSoundInputParametersSelect = 0x107,
  1030.     kSGCGetSoundInputParametersSelect = 0x108
  1031. };
  1032.  
  1033. #define videoDigitizerComponentType 'vdig'
  1034.  
  1035. #define vdigInterfaceRev 2L
  1036.  
  1037. #define ntscIn 0
  1038.  
  1039. #define currentIn 0
  1040.  
  1041. #define palIn 1
  1042.  
  1043. #define secamIn 2
  1044.  
  1045. #define ntscReallyIn 3
  1046.  
  1047. #define compositeIn 0
  1048.  
  1049. #define sVideoIn 1
  1050.  
  1051. #define rgbComponentIn 2
  1052.  
  1053. #define vdPlayThruOff 0
  1054.  
  1055. #define vdPlayThruOn 1
  1056.  
  1057. #define vdDigitizerBW 0
  1058.  
  1059. #define vdDigitizerRGB 1
  1060.  
  1061. #define vdBroadcastMode 0
  1062.  
  1063. #define vdVTRMode 1
  1064.  
  1065. #define vdUseAnyField 0
  1066.  
  1067. #define vdUseOddField 1
  1068.  
  1069. #define vdUseEvenField 2
  1070.  
  1071. #define vdTypeBasic 0
  1072.  
  1073. #define vdTypeAlpha 1
  1074.  
  1075. #define vdTypeMask 2
  1076.  
  1077. #define vdTypeKey 3
  1078.  
  1079. #define digiUnimpErr -2201
  1080.  
  1081. #define qtParamErr -2202
  1082.  
  1083. #define matrixErr -2203
  1084.  
  1085. #define notExactMatrix -2204
  1086.  
  1087. #define noMoreKeyColors -2205
  1088.  
  1089. #define notExactSize -2206
  1090.  
  1091. #define badDepth -2207
  1092.  
  1093. #define noDMA -2208
  1094.  
  1095. #define badCallOrder -2209
  1096.  
  1097. #define digiInDoesNTSC (1L<<0)
  1098.  
  1099. #define digiInDoesPAL (1L<<1)
  1100.  
  1101. #define digiInDoesSECAM (1L<<2)
  1102.  
  1103. #define digiInDoesGenLock (1L<<7)
  1104.  
  1105. #define digiInDoesComposite (1L<<8)
  1106.  
  1107. #define digiInDoesSVideo (1L<<9)
  1108.  
  1109. #define digiInDoesComponent (1L<<10)
  1110.  
  1111. #define digiInVTR_Broadcast (1L<<11)
  1112.  
  1113. #define digiInDoesColor (1L<<12)
  1114.  
  1115. #define digiInDoesBW (1L<<13)
  1116.  
  1117. #define digiInSignalLock (1L<<31)
  1118.  
  1119. #define digiOutDoes1 (1L<<0)
  1120.  
  1121. #define digiOutDoes2 (1L<<1)
  1122.  
  1123. #define digiOutDoes4 (1L<<2)
  1124.  
  1125. #define digiOutDoes8 (1L<<3)
  1126.  
  1127. #define digiOutDoes16 (1L<<4)
  1128.  
  1129. #define digiOutDoes32 (1L<<5)
  1130.  
  1131. #define digiOutDoesDither (1L<<6)
  1132.  
  1133. #define digiOutDoesStretch (1L<<7)
  1134.  
  1135. #define digiOutDoesShrink (1L<<8)
  1136.  
  1137. #define digiOutDoesMask (1L<<9)
  1138.  
  1139. #define digiOutDoesDouble (1L<<11)
  1140.  
  1141. #define digiOutDoesQuad (1L<<12)
  1142.  
  1143. #define digiOutDoesQuarter (1L<<13)
  1144.  
  1145. #define digiOutDoesSixteenth (1L<<14)
  1146.  
  1147. #define digiOutDoesRotate (1L<<15)
  1148.  
  1149. #define digiOutDoesHorizFlip (1L<<16)
  1150.  
  1151. #define digiOutDoesVertFlip (1L<<17)
  1152.  
  1153. #define digiOutDoesSkew (1L<<18)
  1154.  
  1155. #define digiOutDoesBlend (1L<<19)
  1156.  
  1157. #define digiOutDoesWarp (1L<<20)
  1158.  
  1159. #define digiOutDoesHW_DMA (1L<<21)
  1160.  
  1161. #define digiOutDoesHWPlayThru (1L<<22)
  1162.  
  1163. #define digiOutDoesILUT (1L<<23)
  1164.  
  1165. #define digiOutDoesKeyColor (1L<<24)
  1166.  
  1167. #define digiOutDoesAsyncGrabs (1L<<25)
  1168.  
  1169. #define digiOutDoesUnreadableScreenBits (1L<<26)
  1170.  
  1171. #define digiOutDoesCompress (1L<<27)
  1172.  
  1173. #define digiOutDoesCompressOnly (1L<<28)
  1174.  
  1175. #define digiOutDoesPlayThruDuringCompress (1L<<29)
  1176.  
  1177. typedef ComponentInstance VideoDigitizerComponent;
  1178.  
  1179. typedef ComponentResult VideoDigitizerError;
  1180.  
  1181. #if defined(powerc) || defined (__powerc)
  1182. #pragma options align=mac68k
  1183. #endif
  1184. struct DigitizerInfo {
  1185.     short                        vdigType;
  1186.     long                        inputCapabilityFlags;
  1187.     long                        outputCapabilityFlags;
  1188.     long                        inputCurrentFlags;
  1189.     long                        outputCurrentFlags;
  1190.     short                        slot;
  1191.     GDHandle                    gdh;
  1192.     GDHandle                    maskgdh;
  1193.     short                        minDestHeight;
  1194.     short                        minDestWidth;
  1195.     short                        maxDestHeight;
  1196.     short                        maxDestWidth;
  1197.     short                        blendLevels;
  1198.     long                        reserved;
  1199. };
  1200. #if defined(powerc) || defined(__powerc)
  1201. #pragma options align=reset
  1202. #endif
  1203.  
  1204. typedef struct DigitizerInfo DigitizerInfo;
  1205.  
  1206. #if defined(powerc) || defined (__powerc)
  1207. #pragma options align=mac68k
  1208. #endif
  1209. struct VdigType {
  1210.     long                        type;
  1211.     long                        reserved;
  1212. };
  1213. #if defined(powerc) || defined(__powerc)
  1214. #pragma options align=reset
  1215. #endif
  1216.  
  1217. typedef struct VdigType VdigType;
  1218.  
  1219. #if defined(powerc) || defined (__powerc)
  1220. #pragma options align=mac68k
  1221. #endif
  1222. struct VdigTypeList {
  1223.     short                        count;
  1224.     VdigType                    list[1];
  1225. };
  1226. #if defined(powerc) || defined(__powerc)
  1227. #pragma options align=reset
  1228. #endif
  1229.  
  1230. typedef struct VdigTypeList VdigTypeList;
  1231.  
  1232. #if defined(powerc) || defined (__powerc)
  1233. #pragma options align=mac68k
  1234. #endif
  1235. struct VdigBufferRec {
  1236.     PixMapHandle                dest;
  1237.     Point                        location;
  1238.     long                        reserved;
  1239. };
  1240. #if defined(powerc) || defined(__powerc)
  1241. #pragma options align=reset
  1242. #endif
  1243.  
  1244. typedef struct VdigBufferRec VdigBufferRec;
  1245.  
  1246. #if defined(powerc) || defined (__powerc)
  1247. #pragma options align=mac68k
  1248. #endif
  1249. struct VdigBufferRecList {
  1250.     short                        count;
  1251.     MatrixRecordPtr                matrix;
  1252.     RgnHandle                    mask;
  1253.     VdigBufferRec                list[1];
  1254. };
  1255. #if defined(powerc) || defined(__powerc)
  1256. #pragma options align=reset
  1257. #endif
  1258.  
  1259. typedef struct VdigBufferRecList VdigBufferRecList;
  1260.  
  1261. typedef VdigBufferRecList *VdigBufferRecListPtr, **VdigBufferRecListHandle;
  1262.  
  1263. typedef pascal void (*VdigIntProcPtr)(long flags, long refcon);
  1264.  
  1265. enum {
  1266.     uppVdigIntProcInfo = kPascalStackBased
  1267.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  1268.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  1269. };
  1270.  
  1271. #if USESROUTINEDESCRIPTORS
  1272. typedef UniversalProcPtr VdigIntUPP;
  1273.  
  1274. #define CallVdigIntProc(userRoutine, flags, refcon)        \
  1275.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppVdigIntProcInfo, (flags), (refcon))
  1276. #define NewVdigIntProc(userRoutine)        \
  1277.         (VdigIntUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppVdigIntProcInfo, GetCurrentISA())
  1278. #else
  1279. typedef VdigIntProcPtr VdigIntUPP;
  1280.  
  1281. #define CallVdigIntProc(userRoutine, flags, refcon)        \
  1282.         (*(userRoutine))((flags), (refcon))
  1283. #define NewVdigIntProc(userRoutine)        \
  1284.         (VdigIntUPP)(userRoutine)
  1285. #endif
  1286.  
  1287. #if defined(powerc) || defined (__powerc)
  1288. #pragma options align=mac68k
  1289. #endif
  1290. struct VDCompressionList {
  1291.     CodecComponent                codec;
  1292.     CodecType                    cType;
  1293.     Str63                        typeName;
  1294.     Str63                        name;
  1295.     long                        formatFlags;
  1296.     long                        compressFlags;
  1297.     long                        reserved;
  1298. };
  1299. #if defined(powerc) || defined(__powerc)
  1300. #pragma options align=reset
  1301. #endif
  1302.  
  1303. typedef struct VDCompressionList VDCompressionList;
  1304.  
  1305. typedef VDCompressionList *VDCompressionListPtr, **VDCompressionListHandle;
  1306.  
  1307. enum  {
  1308.     dmaDepth1                    = 1,
  1309.     dmaDepth2                    = 2,
  1310.     dmaDepth4                    = 4,
  1311.     dmaDepth8                    = 8,
  1312.     dmaDepth16                    = 16,
  1313.     dmaDepth32                    = 32,
  1314.     dmaDepth2Gray                = 64,
  1315.     dmaDepth4Gray                = 128,
  1316.     dmaDepth8Gray                = 256
  1317. };
  1318.  
  1319. #define kVDIGControlledFrameRate (-1)
  1320.  
  1321. enum  {
  1322.     kvdigSelectors                = 82
  1323. };
  1324.  
  1325. #ifdef __cplusplus
  1326. extern "C" {
  1327. #endif
  1328.  
  1329. extern pascal VideoDigitizerError VDGetMaxSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *maxSrcRect)
  1330.  FIVEWORDINLINE(0x2F3C, 0x6, 0x1, 0x7000, 0xA82A);
  1331. extern pascal VideoDigitizerError VDGetActiveSrcRect(VideoDigitizerComponent ci, short inputStd, Rect *activeSrcRect)
  1332.  FIVEWORDINLINE(0x2F3C, 0x6, 0x2, 0x7000, 0xA82A);
  1333. extern pascal VideoDigitizerError VDSetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  1334.  FIVEWORDINLINE(0x2F3C, 0x4, 0x3, 0x7000, 0xA82A);
  1335. extern pascal VideoDigitizerError VDGetDigitizerRect(VideoDigitizerComponent ci, Rect *digitizerRect)
  1336.  FIVEWORDINLINE(0x2F3C, 0x4, 0x4, 0x7000, 0xA82A);
  1337. extern pascal VideoDigitizerError VDGetVBlankRect(VideoDigitizerComponent ci, short inputStd, Rect *vBlankRect)
  1338.  FIVEWORDINLINE(0x2F3C, 0x6, 0x5, 0x7000, 0xA82A);
  1339. extern pascal VideoDigitizerError VDGetMaskPixMap(VideoDigitizerComponent ci, PixMapHandle maskPixMap)
  1340.  FIVEWORDINLINE(0x2F3C, 0x4, 0x6, 0x7000, 0xA82A);
  1341. extern pascal VideoDigitizerError VDGetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle *dest, Rect *destRect, MatrixRecord *m, RgnHandle *mask)
  1342.  FIVEWORDINLINE(0x2F3C, 0x10, 0x8, 0x7000, 0xA82A);
  1343. extern pascal VideoDigitizerError VDUseThisCLUT(VideoDigitizerComponent ci, CTabHandle colorTableHandle)
  1344.  FIVEWORDINLINE(0x2F3C, 0x4, 0x9, 0x7000, 0xA82A);
  1345. extern pascal VideoDigitizerError VDSetInputGammaValue(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3)
  1346.  FIVEWORDINLINE(0x2F3C, 0xC, 0xA, 0x7000, 0xA82A);
  1347. extern pascal VideoDigitizerError VDGetInputGammaValue(VideoDigitizerComponent ci, Fixed *channel1, Fixed *channel2, Fixed *channel3)
  1348.  FIVEWORDINLINE(0x2F3C, 0xC, 0xB, 0x7000, 0xA82A);
  1349. extern pascal VideoDigitizerError VDSetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  1350.  FIVEWORDINLINE(0x2F3C, 0x4, 0xC, 0x7000, 0xA82A);
  1351. extern pascal VideoDigitizerError VDGetBrightness(VideoDigitizerComponent ci, unsigned short *brightness)
  1352.  FIVEWORDINLINE(0x2F3C, 0x4, 0xD, 0x7000, 0xA82A);
  1353. extern pascal VideoDigitizerError VDSetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  1354.  FIVEWORDINLINE(0x2F3C, 0x4, 0xE, 0x7000, 0xA82A);
  1355. extern pascal VideoDigitizerError VDSetHue(VideoDigitizerComponent ci, unsigned short *hue)
  1356.  FIVEWORDINLINE(0x2F3C, 0x4, 0xF, 0x7000, 0xA82A);
  1357. extern pascal VideoDigitizerError VDSetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  1358.  FIVEWORDINLINE(0x2F3C, 0x4, 0x10, 0x7000, 0xA82A);
  1359. extern pascal VideoDigitizerError VDSetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  1360.  FIVEWORDINLINE(0x2F3C, 0x4, 0x11, 0x7000, 0xA82A);
  1361. extern pascal VideoDigitizerError VDGetContrast(VideoDigitizerComponent ci, unsigned short *contrast)
  1362.  FIVEWORDINLINE(0x2F3C, 0x4, 0x12, 0x7000, 0xA82A);
  1363. extern pascal VideoDigitizerError VDGetHue(VideoDigitizerComponent ci, unsigned short *hue)
  1364.  FIVEWORDINLINE(0x2F3C, 0x4, 0x13, 0x7000, 0xA82A);
  1365. extern pascal VideoDigitizerError VDGetSharpness(VideoDigitizerComponent ci, unsigned short *sharpness)
  1366.  FIVEWORDINLINE(0x2F3C, 0x4, 0x14, 0x7000, 0xA82A);
  1367. extern pascal VideoDigitizerError VDGetSaturation(VideoDigitizerComponent ci, unsigned short *saturation)
  1368.  FIVEWORDINLINE(0x2F3C, 0x4, 0x15, 0x7000, 0xA82A);
  1369. extern pascal VideoDigitizerError VDGrabOneFrame(VideoDigitizerComponent ci)
  1370.  FIVEWORDINLINE(0x2F3C, 0, 0x16, 0x7000, 0xA82A);
  1371. extern pascal VideoDigitizerError VDGetMaxAuxBuffer(VideoDigitizerComponent ci, PixMapHandle *pm, Rect *r)
  1372.  FIVEWORDINLINE(0x2F3C, 0x8, 0x17, 0x7000, 0xA82A);
  1373. extern pascal VideoDigitizerError VDGetDigitizerInfo(VideoDigitizerComponent ci, DigitizerInfo *info)
  1374.  FIVEWORDINLINE(0x2F3C, 0x4, 0x19, 0x7000, 0xA82A);
  1375. extern pascal VideoDigitizerError VDGetCurrentFlags(VideoDigitizerComponent ci, long *inputCurrentFlag, long *outputCurrentFlag)
  1376.  FIVEWORDINLINE(0x2F3C, 0x8, 0x1A, 0x7000, 0xA82A);
  1377. extern pascal VideoDigitizerError VDSetKeyColor(VideoDigitizerComponent ci, long index)
  1378.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1B, 0x7000, 0xA82A);
  1379. extern pascal VideoDigitizerError VDGetKeyColor(VideoDigitizerComponent ci, long *index)
  1380.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1C, 0x7000, 0xA82A);
  1381. extern pascal VideoDigitizerError VDAddKeyColor(VideoDigitizerComponent ci, long *index)
  1382.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1D, 0x7000, 0xA82A);
  1383. extern pascal VideoDigitizerError VDGetNextKeyColor(VideoDigitizerComponent ci, long index)
  1384.  FIVEWORDINLINE(0x2F3C, 0x4, 0x1E, 0x7000, 0xA82A);
  1385. extern pascal VideoDigitizerError VDSetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  1386.  FIVEWORDINLINE(0x2F3C, 0x8, 0x1F, 0x7000, 0xA82A);
  1387. extern pascal VideoDigitizerError VDGetKeyColorRange(VideoDigitizerComponent ci, RGBColor *minRGB, RGBColor *maxRGB)
  1388.  FIVEWORDINLINE(0x2F3C, 0x8, 0x20, 0x7000, 0xA82A);
  1389. extern pascal VideoDigitizerError VDSetDigitizerUserInterrupt(VideoDigitizerComponent ci, long flags, VdigIntUPP userInterruptProc, long refcon)
  1390.  FIVEWORDINLINE(0x2F3C, 0xC, 0x21, 0x7000, 0xA82A);
  1391. extern pascal VideoDigitizerError VDSetInputColorSpaceMode(VideoDigitizerComponent ci, short colorSpaceMode)
  1392.  FIVEWORDINLINE(0x2F3C, 0x2, 0x22, 0x7000, 0xA82A);
  1393. extern pascal VideoDigitizerError VDGetInputColorSpaceMode(VideoDigitizerComponent ci, short *colorSpaceMode)
  1394.  FIVEWORDINLINE(0x2F3C, 0x4, 0x23, 0x7000, 0xA82A);
  1395. extern pascal VideoDigitizerError VDSetClipState(VideoDigitizerComponent ci, short clipEnable)
  1396.  FIVEWORDINLINE(0x2F3C, 0x2, 0x24, 0x7000, 0xA82A);
  1397. extern pascal VideoDigitizerError VDGetClipState(VideoDigitizerComponent ci, short *clipEnable)
  1398.  FIVEWORDINLINE(0x2F3C, 0x4, 0x25, 0x7000, 0xA82A);
  1399. extern pascal VideoDigitizerError VDSetClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  1400.  FIVEWORDINLINE(0x2F3C, 0x4, 0x26, 0x7000, 0xA82A);
  1401. extern pascal VideoDigitizerError VDClearClipRgn(VideoDigitizerComponent ci, RgnHandle clipRegion)
  1402.  FIVEWORDINLINE(0x2F3C, 0x4, 0x27, 0x7000, 0xA82A);
  1403. extern pascal VideoDigitizerError VDGetCLUTInUse(VideoDigitizerComponent ci, CTabHandle *colorTableHandle)
  1404.  FIVEWORDINLINE(0x2F3C, 0x4, 0x28, 0x7000, 0xA82A);
  1405. extern pascal VideoDigitizerError VDSetPLLFilterType(VideoDigitizerComponent ci, short pllType)
  1406.  FIVEWORDINLINE(0x2F3C, 0x2, 0x29, 0x7000, 0xA82A);
  1407. extern pascal VideoDigitizerError VDGetPLLFilterType(VideoDigitizerComponent ci, short *pllType)
  1408.  FIVEWORDINLINE(0x2F3C, 0x4, 0x2A, 0x7000, 0xA82A);
  1409. extern pascal VideoDigitizerError VDGetMaskandValue(VideoDigitizerComponent ci, unsigned short blendLevel, long *mask, long *value)
  1410.  FIVEWORDINLINE(0x2F3C, 0xA, 0x2B, 0x7000, 0xA82A);
  1411. extern pascal VideoDigitizerError VDSetMasterBlendLevel(VideoDigitizerComponent ci, unsigned short *blendLevel)
  1412.  FIVEWORDINLINE(0x2F3C, 0x4, 0x2C, 0x7000, 0xA82A);
  1413. extern pascal VideoDigitizerError VDSetPlayThruDestination(VideoDigitizerComponent ci, PixMapHandle dest, Rect *destRect, MatrixRecord *m, RgnHandle mask)
  1414.  FIVEWORDINLINE(0x2F3C, 0x10, 0x2D, 0x7000, 0xA82A);
  1415. extern pascal VideoDigitizerError VDSetPlayThruOnOff(VideoDigitizerComponent ci, short state)
  1416.  FIVEWORDINLINE(0x2F3C, 0x2, 0x2E, 0x7000, 0xA82A);
  1417. extern pascal VideoDigitizerError VDSetFieldPreference(VideoDigitizerComponent ci, short fieldFlag)
  1418.  FIVEWORDINLINE(0x2F3C, 0x2, 0x2F, 0x7000, 0xA82A);
  1419. extern pascal VideoDigitizerError VDGetFieldPreference(VideoDigitizerComponent ci, short *fieldFlag)
  1420.  FIVEWORDINLINE(0x2F3C, 0x4, 0x30, 0x7000, 0xA82A);
  1421. extern pascal VideoDigitizerError VDPreflightDestination(VideoDigitizerComponent ci, Rect *digitizerRect, PixMap **dest, Rect *destRect, MatrixRecord *m)
  1422.  FIVEWORDINLINE(0x2F3C, 0x10, 0x32, 0x7000, 0xA82A);
  1423. extern pascal VideoDigitizerError VDPreflightGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  1424.  FIVEWORDINLINE(0x2F3C, 0x8, 0x33, 0x7000, 0xA82A);
  1425. extern pascal VideoDigitizerError VDSetPlayThruGlobalRect(VideoDigitizerComponent ci, GrafPtr theWindow, Rect *globalRect)
  1426.  FIVEWORDINLINE(0x2F3C, 0x8, 0x34, 0x7000, 0xA82A);
  1427. extern pascal VideoDigitizerError VDSetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr inputGammaPtr)
  1428.  FIVEWORDINLINE(0x2F3C, 0x4, 0x35, 0x7000, 0xA82A);
  1429. extern pascal VideoDigitizerError VDGetInputGammaRecord(VideoDigitizerComponent ci, VDGamRecPtr *inputGammaPtr)
  1430.  FIVEWORDINLINE(0x2F3C, 0x4, 0x36, 0x7000, 0xA82A);
  1431. extern pascal VideoDigitizerError VDSetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  1432.  FIVEWORDINLINE(0x2F3C, 0x4, 0x37, 0x7000, 0xA82A);
  1433. extern pascal VideoDigitizerError VDGetBlackLevelValue(VideoDigitizerComponent ci, unsigned short *blackLevel)
  1434.  FIVEWORDINLINE(0x2F3C, 0x4, 0x38, 0x7000, 0xA82A);
  1435. extern pascal VideoDigitizerError VDSetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  1436.  FIVEWORDINLINE(0x2F3C, 0x4, 0x39, 0x7000, 0xA82A);
  1437. extern pascal VideoDigitizerError VDGetWhiteLevelValue(VideoDigitizerComponent ci, unsigned short *whiteLevel)
  1438.  FIVEWORDINLINE(0x2F3C, 0x4, 0x3A, 0x7000, 0xA82A);
  1439. extern pascal VideoDigitizerError VDGetVideoDefaults(VideoDigitizerComponent ci, unsigned short *blackLevel, unsigned short *whiteLevel, unsigned short *brightness, unsigned short *hue, unsigned short *saturation, unsigned short *contrast, unsigned short *sharpness)
  1440.  FIVEWORDINLINE(0x2F3C, 0x1C, 0x3B, 0x7000, 0xA82A);
  1441. extern pascal VideoDigitizerError VDGetNumberOfInputs(VideoDigitizerComponent ci, short *inputs)
  1442.  FIVEWORDINLINE(0x2F3C, 0x4, 0x3C, 0x7000, 0xA82A);
  1443. extern pascal VideoDigitizerError VDGetInputFormat(VideoDigitizerComponent ci, short input, short *format)
  1444.  FIVEWORDINLINE(0x2F3C, 0x6, 0x3D, 0x7000, 0xA82A);
  1445. extern pascal VideoDigitizerError VDSetInput(VideoDigitizerComponent ci, short input)
  1446.  FIVEWORDINLINE(0x2F3C, 0x2, 0x3E, 0x7000, 0xA82A);
  1447. extern pascal VideoDigitizerError VDGetInput(VideoDigitizerComponent ci, short *input)
  1448.  FIVEWORDINLINE(0x2F3C, 0x4, 0x3F, 0x7000, 0xA82A);
  1449. extern pascal VideoDigitizerError VDSetInputStandard(VideoDigitizerComponent ci, short inputStandard)
  1450.  FIVEWORDINLINE(0x2F3C, 0x2, 0x40, 0x7000, 0xA82A);
  1451. extern pascal VideoDigitizerError VDSetupBuffers(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList)
  1452.  FIVEWORDINLINE(0x2F3C, 0x4, 0x41, 0x7000, 0xA82A);
  1453. extern pascal VideoDigitizerError VDGrabOneFrameAsync(VideoDigitizerComponent ci, short buffer)
  1454.  FIVEWORDINLINE(0x2F3C, 0x2, 0x42, 0x7000, 0xA82A);
  1455. extern pascal VideoDigitizerError VDDone(VideoDigitizerComponent ci, short buffer)
  1456.  FIVEWORDINLINE(0x2F3C, 0x2, 0x43, 0x7000, 0xA82A);
  1457. extern pascal VideoDigitizerError VDSetCompression(VideoDigitizerComponent ci, OSType compressType, short depth, Rect *bounds, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)
  1458.  FIVEWORDINLINE(0x2F3C, 0x16, 0x44, 0x7000, 0xA82A);
  1459. extern pascal VideoDigitizerError VDCompressOneFrameAsync(VideoDigitizerComponent ci)
  1460.  FIVEWORDINLINE(0x2F3C, 0, 0x45, 0x7000, 0xA82A);
  1461. extern pascal VideoDigitizerError VDCompressDone(VideoDigitizerComponent ci, Boolean *done, Ptr *theData, long *dataSize, unsigned char *similarity, TimeRecord *t)
  1462.  FIVEWORDINLINE(0x2F3C, 0x14, 0x46, 0x7000, 0xA82A);
  1463. extern pascal VideoDigitizerError VDReleaseCompressBuffer(VideoDigitizerComponent ci, Ptr bufferAddr)
  1464.  FIVEWORDINLINE(0x2F3C, 0x4, 0x47, 0x7000, 0xA82A);
  1465. extern pascal VideoDigitizerError VDGetImageDescription(VideoDigitizerComponent ci, ImageDescriptionHandle desc)
  1466.  FIVEWORDINLINE(0x2F3C, 0x4, 0x48, 0x7000, 0xA82A);
  1467. extern pascal VideoDigitizerError VDResetCompressSequence(VideoDigitizerComponent ci)
  1468.  FIVEWORDINLINE(0x2F3C, 0, 0x49, 0x7000, 0xA82A);
  1469. extern pascal VideoDigitizerError VDSetCompressionOnOff(VideoDigitizerComponent ci, Boolean state)
  1470.  FIVEWORDINLINE(0x2F3C, 0x2, 0x4A, 0x7000, 0xA82A);
  1471. extern pascal VideoDigitizerError VDGetCompressionTypes(VideoDigitizerComponent ci, VDCompressionListHandle h)
  1472.  FIVEWORDINLINE(0x2F3C, 0x4, 0x4B, 0x7000, 0xA82A);
  1473. extern pascal VideoDigitizerError VDSetTimeBase(VideoDigitizerComponent ci, TimeBase t)
  1474.  FIVEWORDINLINE(0x2F3C, 0x4, 0x4C, 0x7000, 0xA82A);
  1475. extern pascal VideoDigitizerError VDSetFrameRate(VideoDigitizerComponent ci, Fixed framesPerSecond)
  1476.  FIVEWORDINLINE(0x2F3C, 0x4, 0x4D, 0x7000, 0xA82A);
  1477. extern pascal VideoDigitizerError VDGetDataRate(VideoDigitizerComponent ci, long *milliSecPerFrame, Fixed *framesPerSecond, long *bytesPerSecond)
  1478.  FIVEWORDINLINE(0x2F3C, 0xC, 0x4E, 0x7000, 0xA82A);
  1479. extern pascal VideoDigitizerError VDGetSoundInputDriver(VideoDigitizerComponent ci, Str255 soundDriverName)
  1480.  FIVEWORDINLINE(0x2F3C, 0x4, 0x4F, 0x7000, 0xA82A);
  1481. extern pascal VideoDigitizerError VDGetDMADepths(VideoDigitizerComponent ci, long *depthArray, long *preferredDepth)
  1482.  FIVEWORDINLINE(0x2F3C, 0x8, 0x50, 0x7000, 0xA82A);
  1483. extern pascal VideoDigitizerError VDGetPreferredTimeScale(VideoDigitizerComponent ci, TimeScale *preferred)
  1484.  FIVEWORDINLINE(0x2F3C, 0x4, 0x51, 0x7000, 0xA82A);
  1485. extern pascal VideoDigitizerError VDReleaseAsyncBuffers(VideoDigitizerComponent ci)
  1486.  FIVEWORDINLINE(0x2F3C, 0, 0x52, 0x7000, 0xA82A);
  1487. #ifdef __cplusplus
  1488. }
  1489. #endif
  1490.  
  1491. enum  {
  1492.     kSelectVDGetMaxSrcRect        = 0x1,
  1493.     kSelectVDGetActiveSrcRect    = 0x2,
  1494.     kSelectVDSetDigitizerRect    = 0x3,
  1495.     kSelectVDGetDigitizerRect    = 0x4,
  1496.     kSelectVDGetVBlankRect        = 0x5,
  1497.     kSelectVDGetMaskPixMap        = 0x6,
  1498.     kSelectVDGetPlayThruDestination = 0x8,
  1499.     kSelectVDUseThisCLUT        = 0x9,
  1500.     kSelectVDSetInputGammaValue    = 0xA,
  1501.     kSelectVDGetInputGammaValue    = 0xB,
  1502.     kSelectVDSetBrightness        = 0xC,
  1503.     kSelectVDGetBrightness        = 0xD,
  1504.     kSelectVDSetContrast        = 0xE,
  1505.     kSelectVDSetHue                = 0xF,
  1506.     kSelectVDSetSharpness        = 0x10,
  1507.     kSelectVDSetSaturation        = 0x11,
  1508.     kSelectVDGetContrast        = 0x12,
  1509.     kSelectVDGetHue                = 0x13,
  1510.     kSelectVDGetSharpness        = 0x14,
  1511.     kSelectVDGetSaturation        = 0x15,
  1512.     kSelectVDGrabOneFrame        = 0x16,
  1513.     kSelectVDGetMaxAuxBuffer    = 0x17,
  1514.     kSelectVDGetDigitizerInfo    = 0x19,
  1515.     kSelectVDGetCurrentFlags    = 0x1A,
  1516.     kSelectVDSetKeyColor        = 0x1B,
  1517.     kSelectVDGetKeyColor        = 0x1C,
  1518.     kSelectVDAddKeyColor        = 0x1D,
  1519.     kSelectVDGetNextKeyColor    = 0x1E,
  1520.     kSelectVDSetKeyColorRange    = 0x1F,
  1521.     kSelectVDGetKeyColorRange    = 0x20,
  1522.     kSelectVDSetDigitizerUserInterrupt = 0x21,
  1523.     kSelectVDSetInputColorSpaceMode = 0x22,
  1524.     kSelectVDGetInputColorSpaceMode = 0x23,
  1525.     kSelectVDSetClipState        = 0x24,
  1526.     kSelectVDGetClipState        = 0x25,
  1527.     kSelectVDSetClipRgn            = 0x26,
  1528.     kSelectVDClearClipRgn        = 0x27,
  1529.     kSelectVDGetCLUTInUse        = 0x28,
  1530.     kSelectVDSetPLLFilterType    = 0x29,
  1531.     kSelectVDGetPLLFilterType    = 0x2A,
  1532.     kSelectVDGetMaskandValue    = 0x2B,
  1533.     kSelectVDSetMasterBlendLevel = 0x2C,
  1534.     kSelectVDSetPlayThruDestination = 0x2D,
  1535.     kSelectVDSetPlayThruOnOff    = 0x2E,
  1536.     kSelectVDSetFieldPreference    = 0x2F,
  1537.     kSelectVDGetFieldPreference    = 0x30,
  1538.     kSelectVDPreflightDestination = 0x32,
  1539.     kSelectVDPreflightGlobalRect = 0x33,
  1540.     kSelectVDSetPlayThruGlobalRect = 0x34,
  1541.     kSelectVDSetInputGammaRecord = 0x35,
  1542.     kSelectVDGetInputGammaRecord = 0x36,
  1543.     kSelectVDSetBlackLevelValue    = 0x37,
  1544.     kSelectVDGetBlackLevelValue    = 0x38,
  1545.     kSelectVDSetWhiteLevelValue    = 0x39,
  1546.     kSelectVDGetWhiteLevelValue    = 0x3A,
  1547.     kSelectVDGetVideoDefaults    = 0x3B,
  1548.     kSelectVDGetNumberOfInputs    = 0x3C,
  1549.     kSelectVDGetInputFormat        = 0x3D,
  1550.     kSelectVDSetInput            = 0x3E,
  1551.     kSelectVDGetInput            = 0x3F,
  1552.     kSelectVDSetInputStandard    = 0x40,
  1553.     kSelectVDSetupBuffers        = 0x41,
  1554.     kSelectVDGrabOneFrameAsync    = 0x42,
  1555.     kSelectVDDone                = 0x43,
  1556.     kSelectVDSetCompression        = 0x44,
  1557.     kSelectVDCompressOneFrameAsync = 0x45,
  1558.     kSelectVDCompressDone        = 0x46,
  1559.     kSelectVDReleaseCompressBuffer = 0x47,
  1560.     kSelectVDGetImageDescription = 0x48,
  1561.     kSelectVDResetCompressSequence = 0x49,
  1562.     kSelectVDSetCompressionOnOff = 0x4A,
  1563.     kSelectVDGetCompressionTypes = 0x4B,
  1564.     kSelectVDSetTimeBase        = 0x4C,
  1565.     kSelectVDSetFrameRate        = 0x4D,
  1566.     kSelectVDGetDataRate        = 0x4E,
  1567.     kSelectVDGetSoundInputDriver = 0x4F,
  1568.     kSelectVDGetDMADepths        = 0x50,
  1569.     kSelectVDGetPreferredTimeScale = 0x51,
  1570.     kSelectVDReleaseAsyncBuffers = 0x52
  1571. };
  1572.  
  1573. #define StandardCompressionType 'scdi'
  1574.  
  1575. #define StandardCompressionSubType 'imag'
  1576.  
  1577. typedef pascal Boolean (*SCModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit, long refcon);
  1578.  
  1579. enum {
  1580.     uppSCModalFilterProcInfo = kPascalStackBased
  1581.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  1582.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
  1583.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
  1584.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*)))
  1585.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  1586. };
  1587.  
  1588. #if USESROUTINEDESCRIPTORS
  1589. typedef UniversalProcPtr SCModalFilterUPP;
  1590.  
  1591. #define CallSCModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refcon)        \
  1592.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSCModalFilterProcInfo, (theDialog), (theEvent), (itemHit), (refcon))
  1593. #define NewSCModalFilterProc(userRoutine)        \
  1594.         (SCModalFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCModalFilterProcInfo, GetCurrentISA())
  1595. #else
  1596. typedef SCModalFilterProcPtr SCModalFilterUPP;
  1597.  
  1598. #define CallSCModalFilterProc(userRoutine, theDialog, theEvent, itemHit, refcon)        \
  1599.         (*(userRoutine))((theDialog), (theEvent), (itemHit), (refcon))
  1600. #define NewSCModalFilterProc(userRoutine)        \
  1601.         (SCModalFilterUPP)(userRoutine)
  1602. #endif
  1603.  
  1604. typedef pascal short (*SCModalHookProcPtr)(DialogPtr theDialog, short itemHit, void *params, long refcon);
  1605.  
  1606. enum {
  1607.     uppSCModalHookProcInfo = kPascalStackBased
  1608.          | RESULT_SIZE(SIZE_CODE(sizeof(short)))
  1609.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
  1610.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  1611.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  1612.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  1613. };
  1614.  
  1615. #if USESROUTINEDESCRIPTORS
  1616. typedef UniversalProcPtr SCModalHookUPP;
  1617.  
  1618. #define CallSCModalHookProc(userRoutine, theDialog, itemHit, params, refcon)        \
  1619.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSCModalHookProcInfo, (theDialog), (itemHit), (params), (refcon))
  1620. #define NewSCModalHookProc(userRoutine)        \
  1621.         (SCModalHookUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSCModalHookProcInfo, GetCurrentISA())
  1622. #else
  1623. typedef SCModalHookProcPtr SCModalHookUPP;
  1624.  
  1625. #define CallSCModalHookProc(userRoutine, theDialog, itemHit, params, refcon)        \
  1626.         (*(userRoutine))((theDialog), (itemHit), (params), (refcon))
  1627. #define NewSCModalHookProc(userRoutine)        \
  1628.         (SCModalHookUPP)(userRoutine)
  1629. #endif
  1630.  
  1631. #define scListEveryCodec (1L<<1)
  1632.  
  1633. #define scAllowZeroFrameRate (1L<<2)
  1634.  
  1635. #define scAllowZeroKeyFrameRate (1L<<3)
  1636.  
  1637. #define scShowBestDepth (1L<<4)
  1638.  
  1639. #define scUseMovableModal (1L<<5)
  1640.  
  1641. #define scPreferCropping (1<<0)
  1642.  
  1643. #define scPreferScaling (1<<1)
  1644.  
  1645. #define scPreferScalingAndCropping (scPreferScaling + scPreferCropping)
  1646.  
  1647. #define scTestImageWidth 80
  1648.  
  1649. #define scTestImageHeight 80
  1650.  
  1651. #define scOKItem 1
  1652.  
  1653. #define scCancelItem 2
  1654.  
  1655. #define scCustomItem 3
  1656.  
  1657. #define scUserCancelled 1
  1658.  
  1659. #define scPositionRect 2
  1660.  
  1661. #define scPositionDialog 3
  1662.  
  1663. #define scSetTestImagePictHandle 4
  1664.  
  1665. #define scSetTestImagePictFile 5
  1666.  
  1667. #define scSetTestImagePixMap 6
  1668.  
  1669. #define scGetBestDeviceRect 7
  1670.  
  1671. #define scRequestImageSettings 10
  1672.  
  1673. #define scCompressImage 11
  1674.  
  1675. #define scCompressPicture 12
  1676.  
  1677. #define scCompressPictureFile 13
  1678.  
  1679. #define scRequestSequenceSettings 14
  1680.  
  1681. #define scCompressSequenceBegin 15
  1682.  
  1683. #define scCompressSequenceFrame 16
  1684.  
  1685. #define scCompressSequenceEnd 17
  1686.  
  1687. #define scDefaultPictHandleSettings 18
  1688.  
  1689. #define scDefaultPictFileSettings 19
  1690.  
  1691. #define scDefaultPixMapSettings 20
  1692.  
  1693. #define scGetInfo 21
  1694.  
  1695. #define scSetInfo 22
  1696.  
  1697. #define scNewGWorld 23
  1698.  
  1699. #if defined(powerc) || defined (__powerc)
  1700. #pragma options align=mac68k
  1701. #endif
  1702. struct SCSpatialSettings {
  1703.     CodecType                    codecType;
  1704.     CodecComponent                codec;
  1705.     short                        depth;
  1706.     CodecQ                        spatialQuality;
  1707. };
  1708. #if defined(powerc) || defined(__powerc)
  1709. #pragma options align=reset
  1710. #endif
  1711.  
  1712. typedef struct SCSpatialSettings SCSpatialSettings;
  1713.  
  1714. #if defined(powerc) || defined (__powerc)
  1715. #pragma options align=mac68k
  1716. #endif
  1717. struct SCTemporalSettings {
  1718.     CodecQ                        temporalQuality;
  1719.     Fixed                        frameRate;
  1720.     long                        keyFrameRate;
  1721. };
  1722. #if defined(powerc) || defined(__powerc)
  1723. #pragma options align=reset
  1724. #endif
  1725.  
  1726. typedef struct SCTemporalSettings SCTemporalSettings;
  1727.  
  1728. #if defined(powerc) || defined (__powerc)
  1729. #pragma options align=mac68k
  1730. #endif
  1731. struct SCDataRateSettings {
  1732.     long                        dataRate;
  1733.     long                        frameDuration;
  1734.     CodecQ                        minSpatialQuality;
  1735.     CodecQ                        minTemporalQuality;
  1736. };
  1737. #if defined(powerc) || defined(__powerc)
  1738. #pragma options align=reset
  1739. #endif
  1740.  
  1741. typedef struct SCDataRateSettings SCDataRateSettings;
  1742.  
  1743. #if defined(powerc) || defined (__powerc)
  1744. #pragma options align=mac68k
  1745. #endif
  1746. struct SCExtendedProcs {
  1747.     SCModalFilterUPP            filterProc;
  1748.     SCModalHookUPP                hookProc;
  1749.     long                        refcon;
  1750.     Str31                        customName;
  1751. };
  1752. #if defined(powerc) || defined(__powerc)
  1753. #pragma options align=reset
  1754. #endif
  1755.  
  1756. typedef struct SCExtendedProcs SCExtendedProcs;
  1757.  
  1758. #define scSpatialSettingsType 'sptl'
  1759.  
  1760. #define scTemporalSettingsType 'tprl'
  1761.  
  1762. #define scDataRateSettingsType 'drat'
  1763.  
  1764. #define scColorTableType 'clut'
  1765.  
  1766. #define scProgressProcType 'prog'
  1767.  
  1768. #define scExtendedProcsType 'xprc'
  1769.  
  1770. #define scPreferenceFlagsType 'pref'
  1771.  
  1772. #define scSettingsStateType 'ssta'
  1773.  
  1774. #define scSequenceIDType 'sequ'
  1775.  
  1776. #define scWindowPositionType 'wndw'
  1777.  
  1778. #define scCodecFlagsType 'cflg'
  1779.  
  1780. #define scCodecSettingsType 'cdec'
  1781.  
  1782. #ifdef __cplusplus
  1783. extern "C" {
  1784. #endif
  1785.  
  1786. extern pascal ComponentResult SCPositionRect(ComponentInstance ci, Rect *rp, Point *where)
  1787.  FIVEWORDINLINE(0x2F3C, 0x8, 0x2, 0x7000, 0xA82A);
  1788. extern pascal ComponentResult SCPositionDialog(ComponentInstance ci, short id, Point *where)
  1789.  FIVEWORDINLINE(0x2F3C, 0x6, 0x3, 0x7000, 0xA82A);
  1790. extern pascal ComponentResult SCSetTestImagePictHandle(ComponentInstance ci, PicHandle testPict, Rect *testRect, short testFlags)
  1791.  FIVEWORDINLINE(0x2F3C, 0xA, 0x4, 0x7000, 0xA82A);
  1792. extern pascal ComponentResult SCSetTestImagePictFile(ComponentInstance ci, short testFileRef, Rect *testRect, short testFlags)
  1793.  FIVEWORDINLINE(0x2F3C, 0x8, 0x5, 0x7000, 0xA82A);
  1794. extern pascal ComponentResult SCSetTestImagePixMap(ComponentInstance ci, PixMapHandle testPixMap, Rect *testRect, short testFlags)
  1795.  FIVEWORDINLINE(0x2F3C, 0xA, 0x6, 0x7000, 0xA82A);
  1796. extern pascal ComponentResult SCGetBestDeviceRect(ComponentInstance ci, Rect *r)
  1797.  FIVEWORDINLINE(0x2F3C, 0x4, 0x7, 0x7000, 0xA82A);
  1798. extern pascal ComponentResult SCRequestImageSettings(ComponentInstance ci)
  1799.  FIVEWORDINLINE(0x2F3C, 0, 0xA, 0x7000, 0xA82A);
  1800. extern pascal ComponentResult SCCompressImage(ComponentInstance ci, PixMapHandle src, Rect *srcRect, ImageDescriptionHandle *desc, Handle *data)
  1801.  FIVEWORDINLINE(0x2F3C, 0x10, 0xB, 0x7000, 0xA82A);
  1802. extern pascal ComponentResult SCCompressPicture(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture)
  1803.  FIVEWORDINLINE(0x2F3C, 0x8, 0xC, 0x7000, 0xA82A);
  1804. extern pascal ComponentResult SCCompressPictureFile(ComponentInstance ci, short srcRefNum, short dstRefNum)
  1805.  FIVEWORDINLINE(0x2F3C, 0x4, 0xD, 0x7000, 0xA82A);
  1806. extern pascal ComponentResult SCRequestSequenceSettings(ComponentInstance ci)
  1807.  FIVEWORDINLINE(0x2F3C, 0, 0xE, 0x7000, 0xA82A);
  1808. extern pascal ComponentResult SCCompressSequenceBegin(ComponentInstance ci, PixMapHandle src, Rect *srcRect, ImageDescriptionHandle *desc)
  1809.  FIVEWORDINLINE(0x2F3C, 0xC, 0xF, 0x7000, 0xA82A);
  1810. extern pascal ComponentResult SCCompressSequenceFrame(ComponentInstance ci, PixMapHandle src, Rect *srcRect, Handle *data, long *dataSize, short *notSyncFlag)
  1811.  FIVEWORDINLINE(0x2F3C, 0x14, 0x10, 0x7000, 0xA82A);
  1812. extern pascal ComponentResult SCCompressSequenceEnd(ComponentInstance ci)
  1813.  FIVEWORDINLINE(0x2F3C, 0, 0x11, 0x7000, 0xA82A);
  1814. extern pascal ComponentResult SCDefaultPictHandleSettings(ComponentInstance ci, PicHandle srcPicture, short motion)
  1815.  FIVEWORDINLINE(0x2F3C, 0x6, 0x12, 0x7000, 0xA82A);
  1816. extern pascal ComponentResult SCDefaultPictFileSettings(ComponentInstance ci, short srcRef, short motion)
  1817.  FIVEWORDINLINE(0x2F3C, 0x4, 0x13, 0x7000, 0xA82A);
  1818. extern pascal ComponentResult SCDefaultPixMapSettings(ComponentInstance ci, PixMapHandle src, short motion)
  1819.  FIVEWORDINLINE(0x2F3C, 0x6, 0x14, 0x7000, 0xA82A);
  1820. extern pascal ComponentResult SCGetInfo(ComponentInstance ci, OSType type, void *info)
  1821.  FIVEWORDINLINE(0x2F3C, 0x8, 0x15, 0x7000, 0xA82A);
  1822. extern pascal ComponentResult SCSetInfo(ComponentInstance ci, OSType type, void *info)
  1823.  FIVEWORDINLINE(0x2F3C, 0x8, 0x16, 0x7000, 0xA82A);
  1824. extern pascal ComponentResult SCNewGWorld(ComponentInstance ci, GWorldPtr *gwp, Rect *rp, GWorldFlags flags)
  1825.  FIVEWORDINLINE(0x2F3C, 0xC, 0x17, 0x7000, 0xA82A);
  1826. #ifdef __cplusplus
  1827. }
  1828. #endif
  1829.  
  1830. #if defined(powerc) || defined (__powerc)
  1831. #pragma options align=mac68k
  1832. #endif
  1833. struct SCParams {
  1834.     long                        flags;
  1835.     CodecType                    theCodecType;
  1836.     CodecComponent                theCodec;
  1837.     CodecQ                        spatialQuality;
  1838.     CodecQ                        temporalQuality;
  1839.     short                        depth;
  1840.     Fixed                        frameRate;
  1841.     long                        keyFrameRate;
  1842.     long                        reserved1;
  1843.     long                        reserved2;
  1844. };
  1845. #if defined(powerc) || defined(__powerc)
  1846. #pragma options align=reset
  1847. #endif
  1848.  
  1849. typedef struct SCParams SCParams;
  1850.  
  1851. #define scGetCompression 1
  1852.  
  1853. #define scShowMotionSettings (1L<<0)
  1854.  
  1855. #define scSettingsChangedItem -1
  1856.  
  1857. #ifdef __cplusplus
  1858. extern "C" {
  1859. #endif
  1860.  
  1861. extern pascal ComponentResult SCGetCompressionExtended(long ci, SCParams *params, Point where, SCModalFilterUPP filterProc, SCModalHookUPP hookProc, long refcon, StringPtr customName)
  1862.  FIVEWORDINLINE(0x2F3C, 0x18, 0x1, 0x7000, 0xA82A);
  1863. #define SCGetCompression(ci, params, where) SCGetCompressionExtended(ci,params,where,0,0,0,0)
  1864.  
  1865. #ifdef __cplusplus
  1866. }
  1867. #endif
  1868.  
  1869. typedef ComponentInstance MovieImportComponent, MovieExportComponent;
  1870.  
  1871. #define MovieImportType 'eat '
  1872.  
  1873. #define MovieExportType 'spit'
  1874.  
  1875. enum  {
  1876.     canMovieImportHandles        = 1,
  1877.     canMovieImportFiles            = 2,
  1878.     hasMovieImportUserInterface    = 4,
  1879.     canMovieExportHandles        = 8,
  1880.     canMovieExportFiles            = 16,
  1881.     hasMovieExportUserInterface    = 32,
  1882.     dontAutoFileMovieImport        = 64,
  1883.     canMovieExportAuxDataHandle    = 128,
  1884.     canMovieImportValidateHandles = 256,
  1885.     canMovieImportValidateFile    = 512,
  1886.     dontRegisterWithEasyOpen    = 1024
  1887. };
  1888.  
  1889. enum  {
  1890.     kMovieImportExportOpenSelect = kComponentOpenSelect,
  1891.     kMovieImportExportCloseSelect = kComponentCloseSelect,
  1892.     kMovieImportExportCanDoSelect = kComponentCanDoSelect,
  1893.     kMovieImportExportVersionSelect = kComponentVersionSelect,
  1894.     kMovieImportHandleSelect    = 1,
  1895.     kMovieImportFileSelect        = 2,
  1896.     kMovieImportSetSampleDurationSelect = 3,
  1897.     kMovieImportSetSampleDescriptionSelect = 4,
  1898.     kMovieImportSetMediaFileSelect = 5,
  1899.     kMovieImportSetDimensionsSelect = 6,
  1900.     kMovieImportSetChunkSizeSelect = 7,
  1901.     kMovieImportSetProgressProcSelect = 8,
  1902.     kMovieImportSetAuxiliaryDataSelect = 9,
  1903.     kMovieImportSetFromScrapSelect = 10,
  1904.     kMovieImportDoUserDialogSelect = 11,
  1905.     kMovieImportSetDurationSelect = 12,
  1906.     kMovieImportGetAuxiliaryDataTypeSelect = 13,
  1907.     kMovieImportValidateSelect    = 14,
  1908.     kMovieExportToHandleSelect    = 128,
  1909.     kMovieExportToFileSelect    = 129,
  1910.     kMovieExportDoUserDialogSelect = 130,
  1911.     kMovieExportGetAuxiliaryDataSelect = 131,
  1912.     kMovieExportSetProgressProcSelect = 132,
  1913.     kMovieExportSetSampleDescriptionSelect = 133
  1914. };
  1915.  
  1916. enum  {
  1917.     movieImportCreateTrack        = 1,
  1918.     movieImportInParallel        = 2,
  1919.     movieImportMustUseTrack        = 4
  1920. };
  1921.  
  1922. enum  {
  1923.     movieImportResultUsedMultipleTracks = 8
  1924. };
  1925.  
  1926. #ifdef __cplusplus
  1927. extern "C" {
  1928. #endif
  1929.  
  1930. extern pascal ComponentResult MovieImportHandle(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  1931.  FIVEWORDINLINE(0x2F3C, 0x20, 0x1, 0x7000, 0xA82A);
  1932. extern pascal ComponentResult MovieImportFile(MovieImportComponent ci, const FSSpec *theFile, Movie theMovie, Track targetTrack, Track *usedTrack, TimeValue atTime, TimeValue *addedDuration, long inFlags, long *outFlags)
  1933.  FIVEWORDINLINE(0x2F3C, 0x20, 0x2, 0x7000, 0xA82A);
  1934. extern pascal ComponentResult MovieImportSetSampleDuration(MovieImportComponent ci, TimeValue duration, TimeScale scale)
  1935.  FIVEWORDINLINE(0x2F3C, 0x8, 0x3, 0x7000, 0xA82A);
  1936. extern pascal ComponentResult MovieImportSetSampleDescription(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  1937.  FIVEWORDINLINE(0x2F3C, 0x8, 0x4, 0x7000, 0xA82A);
  1938. extern pascal ComponentResult MovieImportSetMediaFile(MovieImportComponent ci, AliasHandle alias)
  1939.  FIVEWORDINLINE(0x2F3C, 0x4, 0x5, 0x7000, 0xA82A);
  1940. extern pascal ComponentResult MovieImportSetDimensions(MovieImportComponent ci, Fixed width, Fixed height)
  1941.  FIVEWORDINLINE(0x2F3C, 0x8, 0x6, 0x7000, 0xA82A);
  1942. extern pascal ComponentResult MovieImportSetChunkSize(MovieImportComponent ci, long chunkSize)
  1943.  FIVEWORDINLINE(0x2F3C, 0x4, 0x7, 0x7000, 0xA82A);
  1944. extern pascal ComponentResult MovieImportSetProgressProc(MovieImportComponent ci, MovieProgressUPP proc, long refcon)
  1945.  FIVEWORDINLINE(0x2F3C, 0x8, 0x8, 0x7000, 0xA82A);
  1946. extern pascal ComponentResult MovieImportSetAuxiliaryData(MovieImportComponent ci, Handle data, OSType handleType)
  1947.  FIVEWORDINLINE(0x2F3C, 0x8, 0x9, 0x7000, 0xA82A);
  1948. extern pascal ComponentResult MovieImportSetFromScrap(MovieImportComponent ci, Boolean fromScrap)
  1949.  FIVEWORDINLINE(0x2F3C, 0x2, 0xA, 0x7000, 0xA82A);
  1950. extern pascal ComponentResult MovieImportDoUserDialog(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *canceled)
  1951.  FIVEWORDINLINE(0x2F3C, 0xC, 0xB, 0x7000, 0xA82A);
  1952. extern pascal ComponentResult MovieImportSetDuration(MovieImportComponent ci, TimeValue duration)
  1953.  FIVEWORDINLINE(0x2F3C, 0x4, 0xC, 0x7000, 0xA82A);
  1954. extern pascal ComponentResult MovieImportGetAuxiliaryDataType(MovieImportComponent ci, OSType *auxType)
  1955.  FIVEWORDINLINE(0x2F3C, 0x4, 0xD, 0x7000, 0xA82A);
  1956. extern pascal ComponentResult MovieImportValidate(MovieImportComponent ci, const FSSpec *theFile, Handle theData, Boolean *valid)
  1957.  FIVEWORDINLINE(0x2F3C, 0xC, 0xE, 0x7000, 0xA82A);
  1958. extern pascal ComponentResult MovieExportToHandle(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  1959.  FIVEWORDINLINE(0x2F3C, 0x14, 0x80, 0x7000, 0xA82A);
  1960. extern pascal ComponentResult MovieExportToFile(MovieExportComponent ci, const FSSpec *theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration)
  1961.  FIVEWORDINLINE(0x2F3C, 0x14, 0x81, 0x7000, 0xA82A);
  1962. extern pascal ComponentResult MovieExportDoUserDialog(MovieExportComponent ci, const FSSpec *theFile, Handle theData, Boolean *canceled)
  1963.  FIVEWORDINLINE(0x2F3C, 0xC, 0x82, 0x7000, 0xA82A);
  1964. extern pascal ComponentResult MovieExportGetAuxiliaryData(MovieExportComponent ci, Handle dataH, OSType *handleType)
  1965.  FIVEWORDINLINE(0x2F3C, 0x8, 0x83, 0x7000, 0xA82A);
  1966. extern pascal ComponentResult MovieExportSetProgressProc(MovieExportComponent ci, MovieProgressUPP proc, long refcon)
  1967.  FIVEWORDINLINE(0x2F3C, 0x8, 0x84, 0x7000, 0xA82A);
  1968. extern pascal ComponentResult MovieExportSetSampleDescription(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType)
  1969.  FIVEWORDINLINE(0x2F3C, 0x8, 0x85, 0x7000, 0xA82A);
  1970. #if defined(powerc) || defined (__powerc)
  1971. #pragma options align=mac68k
  1972. #endif
  1973. struct TextDisplayData {
  1974.     long                        displayFlags;
  1975.     long                        textJustification;
  1976.     RGBColor                    bgColor;
  1977.     Rect                        textBox;
  1978.     short                        beginHilite;
  1979.     short                        endHilite;
  1980.     RGBColor                    hiliteColor;
  1981.     Boolean                        doHiliteColor;
  1982.     TimeValue                    scrollDelayDur;
  1983.     Point                        dropShadowOffset;
  1984.     short                        dropShadowTransparency;
  1985. };
  1986. #if defined(powerc) || defined(__powerc)
  1987. #pragma options align=reset
  1988. #endif
  1989.  
  1990. typedef struct TextDisplayData TextDisplayData;
  1991.  
  1992. typedef ComponentInstance TextExportComponent;
  1993.  
  1994. extern pascal ComponentResult TextExportGetDisplayData(TextExportComponent ci, TextDisplayData *textDisplay)
  1995.  FIVEWORDINLINE(0x2F3C, 0x4, 0x100, 0x7000, 0xA82A);
  1996. #ifdef __cplusplus
  1997. }
  1998. #endif
  1999.  
  2000. typedef ComponentInstance pnotComponent;
  2001.  
  2002. enum  {
  2003.     pnotComponentWantsEvents    = 1,
  2004.     pnotComponentNeedsNoCache    = 2
  2005. };
  2006.  
  2007. enum  {
  2008.     kPreviewOpenSelector        = 0,
  2009.     kPreviewCloseSelector        = -1,
  2010.     kPreviewCanDoSelector        = -2,
  2011.     kPreviewVersionSelector        = -3,
  2012.     kPreviewShowDataSelector    = 1,
  2013.     kPreviewMakePreviewSelector    = 2,
  2014.     kPreviewMakePreviewReferenceSelector = 3,
  2015.     kPreviewEventSelector        = 4
  2016. };
  2017.  
  2018. #define ShowFilePreviewComponentType 'pnot'
  2019.  
  2020. #define CreateFilePreviewComponentType 'pmak'
  2021.  
  2022. #ifdef __cplusplus
  2023. extern "C" {
  2024. #endif
  2025.  
  2026. extern pascal ComponentResult PreviewShowData(pnotComponent p, OSType dataType, Handle data, const Rect *inHere)
  2027.  FIVEWORDINLINE(0x2F3C, 0xC, 0x1, 0x7000, 0xA82A);
  2028. extern pascal ComponentResult PreviewMakePreview(pnotComponent p, OSType *previewType, Handle *previewResult, const FSSpec *sourceFile, ICMProgressProcRecordPtr progress)
  2029.  FIVEWORDINLINE(0x2F3C, 0x10, 0x2, 0x7000, 0xA82A);
  2030. extern pascal ComponentResult PreviewMakePreviewReference(pnotComponent p, OSType *previewType, short *resID, const FSSpec *sourceFile)
  2031.  FIVEWORDINLINE(0x2F3C, 0xC, 0x3, 0x7000, 0xA82A);
  2032. extern pascal ComponentResult PreviewEvent(pnotComponent p, EventRecord *e, Boolean *handledEvent)
  2033.  FIVEWORDINLINE(0x2F3C, 0x8, 0x4, 0x7000, 0xA82A);
  2034. #ifdef __cplusplus
  2035. }
  2036. #endif
  2037.  
  2038. #endif
  2039.  
  2040.